How to empty your DNS cache on Windows, Mac and Linux?

Each time you type the name of a site, your computer’s operating system retrieves the corresponding IP address from your Internet Service Provider. In order to speed up the connection to the sites you visit often, your operating system (Windows, Mac, Linux, etc.) maintains what is called the “DNS cache”, a list of IP addresses. This cache is automatically purged every 24 hours or something like that.

The concern is that some websites change their IP address regularly (or for a given reason). Then the following situation occurs:
You type the address of a site that you visited before, and Windows, Mac or Linux can no longer access it.
To remedy this, you must purge the DNS cache by following these steps:


  • Start -> Run -> type cmd
  • In the DOS window, type ipconfig /flushdns
  • There you go! Your DNS cache has been flushed.


  • If you have Leopard, type: dscacheutil -flushcache … else type: lookupd -flushcache in a terminal


  • Type /etc/rc.d/init.d/nscd restart in a terminal to restart nscd
  • Once the command is executed, your DNS cache has been cleaned up