Clear DNS Cache

I have experienced some problems in the past (and still do from time to time) with opening specific sites from my computer while my internet connection is fine and other sites open without any issues.

The cause of the problem in my case is DNS cache which holds lookup values for hosts and the request times out because the cache is pointing to the incorrect location. I found that when I clear DNS cache on my Mac OS computer it solves the issue.

Most DNS requests from your computer when you open a web page, check emails and do other internet related tasks is usually cached DNS stored internally on your computer. The DNS cache is saved every now and again in order to speed up lookups to the same host(s) in the future for better performance. If you need to clear your DNS cache on Mac OS for some reason or another, you can do it with the following command.

Clear DNS Cache in Mac OS Tiger

lookupd -flushcache

Clear DNS Cache in Mac OS Leopard

dscacheutil -flushcache