OS X always keeps a local cache of resolved DNS queries (IP address) for future reference. But sometimes it may be necessary to clear (flush) the cache. You can do this with a terminal command, this will refresh the local DNS cache.
When you need to do this?
For example if you hit lot of 404 server error code
Launch Terminal and enter the following command for
OSX 10.10
sudo discoveryutil udnsflushcaches
OSX 10.9
dscacheutil -flushcache; sudo killall -HUP mDNSResponder
OSX 10.7 – 10.8
sudo killall -HUP mDNSResponder
OSX 10.5 – 10.6
sudo dscacheutil -flushcache
An excellent tip !.
Please, in OSX 10.9 are there one or two commands ?.
Thank you
two commands, but you can run them together