How to clear your local DNS cache

Updated on Apr 23, 2018

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:

    • Enter WinX menu(Shortcut: Win+X)
    • Right click on Command Prompt and Run as Administrator.
    • Execute the following command:
ipconfig /flushdns

If the command is executed properly it will provide you with a successfully flushed message.

Windows 7

To clear DNS cache for windows 7 follow these steps:

  • From the start menu search for cmd.
  • In the search results right click on Command Prompt(cmd) and ‘Run as Administrator'
  • 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:

      • In the Start menu click on Run….(For Vista, if you don't see the Run…. Command, search for it in the search bar.)
      • 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
On this page...

    SSD Web Hosting

    • Free Domain Transfer
    • 24/7 Technical Support
    • Fast SSD Storage
    • Hack-free Protection
    • Free Script Installation
    • Free Website Transfer
    • Free Cloudflare CDN
    • Immediate Activation
    View More