Check our Summer Specials! Get a Free Account or SEO Bundle with 80% off. View Offers

How to clear your local DNS cache

This tutorial will show you how to flush your local computer DNS cache on various operation systems.

The DNS cache stores the IP addresses of the websites that you recently accessed via your web browser in order to speed up the access by skipping the process of querying the name servers.  

 

When should you clear your DNS Cache:

 

  • If a website that you have accessed, changes its IP address, you will not be able to access it since the web browser would still be looking at the old address of the server, which is stored in the DNS cache.
  • If you are pointing your domain from one server to another (e.g. you are transferring your website from one host to another), this will change your website’s IP. In order to immediately be able to access your website and skip the propagation of the ISP’s DNS cache (same as your cache, with the only difference that it is for your internet provider) you would have to clear your cache and also edit the hosts file to explicitly point your domain to the new server’s IP.

 

How to clear DNS cache for various OS:

 

  • Windows 8

To clear DNS cache for windows 8 follow these steps:

 

  1. Enter WinX menu(Shortcut: Win+X)
  2. Execute the following command:
    ipconfig /flushdns
    If the command is executed properly it will provide you with a successfully flushed message.
  1. Right click on Command Prompt and Run as Administrator.
  • Windows 7

To clear DNS cache for windows 7 follow these steps:

 

  1. From the start menu search for cmd.
  2. In the search results right click on Command Prompt(cmd) and ‘Run as Administrator’
  3. Execute the following command:
    ipconfig /flushdns
    If the command is executed properly it will provide you with a successfully flushed message.

 

  • Windows Vista/XP/2000

To clear DNS cache for windows Vista/XP/2000, follow these steps:

 

  1. In the Start menu click on Run….(For Vista, if you don’t see the Run…. Command, search for it in the search bar.)
  2. Execute the following command:
    ipconfig /flushdns
    If the command is executed properly it will provide you with a successfully flushed message.

 

  • MacOS (In order to execute the commands in the steps bellow you must know the administrator’s login details)

 

  • MacOS 10.10

To clear DNS cache for MacOS 10.10, follow these steps:

Click Applications

Click Utilities

Click Terminal

Execute the following command:

sudo discoveryutil mdnsflushcache

 

  • MacOS 10.7,10.8, 10.9

To clear DNS cache for MacOS 10.7,10.8, 10.9, follow these steps:

Click Applications

Click Utilities

Double - click Terminal

Execute the following command:

sudo killall -HUP mDNSResponder

 

  • MacOS 10.5, 10.6

To clear DNS cache for MacOS 10.5, 10.6, follow these steps:

Click Applications

Click Utilities

Double - click Terminal

Execute the following command:

sudo dscacheutil -flushcache