How to clear DNS cache in Mac OSX

Every outgoing DNS request is cached for optimized performance. Its good for faster lookups of the same host but sometimes we will want to clear the cache if the host name no longer points to the earlier IPAddress. To clear the DNS cache in Mac OSX we need to use the “Terminal” application. Type “terminal” in spotlight and open the application “Terminal”.

When you are on the terminal, it shows a user shell. Enter this command.
shell> dscacheutil -flushcache

And after the command is executed. Try visiting the website through any browser to see if the website now loads from the valid IP Address.

Leave a Comment

Read previous post:
How to ensure mac osx time machine is creating restorable backups

While using a Mac OSX, make sure you have a spare external hard drive which is used to take Time...

Close