Every now and then I run into a situation where I need to clear my DNS cache. This is sometimes needed when there are negative DNS values, meaning incorrect IP addresses on my computer for certain internet sites that I want to connect to. You can use the following commands to flush DNS and see if this allows you to reach the site.

Mac OS X:

For OS X, Lookupd takes care of cached DNS entries. You will need to open a Terminal session and type the following command:

lookupd -flushcache

On Mac OS X 10.5 Leopard, you no longer have the lookupd command. Use the dscacheutil command instead:

dscacheutil -flushcache

Windows:

For Windows, the IPConfig utility serves as an easy way to view TCP/IP settings and as a utility to flush DNS. You will need to open up a prompt and type the following command:

ipconfig /flushdns

Windows2000 & XP save negative DNS entries by default, so you might want to try disabling negative DNS caching to get a more responsive internet connection.

Microsoft has some notes on DNS settings in Windows too that you can reference.