If you are like me, working with websites and servers on a regular basis. Then you know that when you change DNS settings it can sometimes be a tough deal, because the DNS settings are cached on your computer. Well rather than being frustrated, and annoyed as you wait for the your cache to timeout and be refreshed, just force the cache to be cleared so that you can continue with the business that you have awaiting your magic touch.

Depending on the age of your mac there are two different ways to accomplish this:

Leopard and Above (OSX 10.5 and higher) :

dscacheutil – flushcache

Tiger and Below (OSX 10.4 and lower) :

lookupd -flushcache

With either command your DNS cache is completely cleared so that your next DNS query will be forced to be requested from your upstream DNS provider.

I hope this helps someone out there to save some time, effort, and energy,as it did for me.

Originally read at:

Hongkiat.com: Hongkiat – How to Clear DNS Cache In Mac OSX Leopard