Occasionally it may be necessary to flush the cache in OSX. Apple says ‘if you are a network or server administrator and an entry on your DNS server has recently changed’ this could come in handy, but as a web developer I find myself doing this fairly often.
If you update the name servers on a domain and expect to see a certain website, but it’s showing another, flushing the DNS cache could solve the problem and is one of the first steps I take in troubleshooting.
Simply open up Terminal and paste this into the window, then enter your password:
sudo killall -HUP mDNSResponder
If you aren’t running the latest version of EL Cap, see this support article to obtain the correct command for your OS.