Thursday, September 30, 2010

How to flush the DNS cache in Windows and OS X

If you're having problems with DNS, try flushing the local DNS cache. If you don't know what DNS is, this is the service that handles translating domain names, such as, into IP addresses. This allows you to remember the domain name, but then allows the computer to use the IP address to communicate with it. Sometimes DNS settings get changed, but those changes can take a little while to propagate through to everyone system. To speed the propagation along, you can flush your DNS cache manually and force it to reload the most recent settings. To do that in Windows or Mac OS X:

Open a command prompt (Start->Run->cmd, then OK). Then type ipconfig /flushdns and press Enter

Open Terminal (Applications->Utilities->Terminal) and type dscacheutil -flushcache then pressing Enter

You should note that this only flushes the DNS cache on your local machine. DNS is a hierarchical system that relies on many different levels of connections, each of which have their own DNS cache. If you manage your own DNS server that would be the next step to diagnosing a problem if flushing the client machine's cache doesn't work. However, that's another topic entirely and this is only meant to give you the quick way to manually flush the DNS cache. If you want to learn more about how DNS works, check out the Wikipedia article, or search online because you'll find plenty of resources.

No comments: