How to Flush the DNS Cache in Mac OS X

By John Ford

DNS cache or Domain Name Server cache is the local file your Mac system uses to convert or resolve host names to numbered IP (internet protocol) addresses. It is possible for the cache file to become corrupt or damaged, this is especially important for web designers and system administrators performing network tasks and coding web sites.

Step 1

In a new Finder window, navigate to “Applications/Utilities/Terminal” and double click on the "Terminal" application to launch it.

Step 2

In your new window, enter the following command if you are using Mac OS X 10.5 Leopard:dscacheutil –flushcache

Step 3

If you are using Mac OS X 10.4 Tiger, enter the following command in your new window:lookupd –flushcache

Step 4

Once you have entered the above command, your DNS cache has been successfully flushed. Any issues with resolving IP addresses and host names in the DNS cache should be resolved.