How to flush your DNS cache

Ask a question
Windows keeps track of all the websites you have visited in the DNS cache. If ever a website changes its IP address, you won't be access it. You need to clear your DNS cache to speed up future connections to this website.


Empty the DNS cache of Windows

  • Open a command prompt (Run > cmd)
  • Type the following command and press Enter:
    • ipconfig /displaydns
  • At the bottom of the list that appears, type the following command and press Enter:
    • ipconfig /flushdns
  • A message will indicate that the DNS client resolver cache had be been flushed.

Empty the DNS cache of Mac OS X

The principle is the same as for a PC.
  • Go to Utilities> Applications > Terminal.
  • Type one of the following commands:
  • Mountain Lion or Lion:
    sudo killall -HUP mDNSResponder
  • Leopard and earlier:
    lookupd -flushcache 
  • Snow Leopard:
    dscacheutil -flushcache

Empty the DNS cache of Linux

  • Open the terminal as root.
  • Type the following command and press Enter:
    • /etc/init.d/nscd restart