How to Flush Windows DNS Cache?

How to Flush Windows DNS Cache?

Flushing DNS cache is an efficient way to address any host connection errors that usually occur within Google Chrome or other web browsers. In this guide, let’s go through the process to flush or reset a client resolver cache using a “Prompt” window from various versions of Windows OS.

What Is Exactly the DNS Cache?

In most instances, you DNS (Domain Name System) cache will automatically store all the webpages and IP addresses that you’ve recently visited. This is done to accelerate subsequent requests from the same locations or hostnames. However, you’ll be doomed to encounter an overwhelming number of DNS errors if the cached IP address becomes outdated or a website changes its server.

Page Not Found Error

Sometimes, you may receive “Page Not Found” and many other HTML 404 error codes if accessing websites with an imperfect web safety rating. Also, some negative cache entries may prevent you from communicating with the host correctly. That’s the purpose of a DNS flush.

How About Flushing?

As noted above, a DNS flush makes your computer clear out all the existing information related to IP addresses and DNS names. After such a flush, the next time you visit the same website, the computer will query the name server for the up-to-date IP and DNS information without any user input. Undoubtedly, this contributes to creating an error-free browsing experience.

How to Flush DNS Cache with Windows OS?

Generally there are two major methods to remove those bad entries. One is to allow 24 hours to pass so that your computer would implement the necessary DNS updates. Assuming that you prefer to flush DNS cache, following are the instructions to perform this task.

Step 1: Firstly, enter the command to flush your DNS cache within the command prompt. Depending on the version of Windows you’re using, opening the command prompt window will vary greatly. Note that, this kind of CLI (command line interface) can be used to run your node.js.

  • Windows NT/XP/98/2000:
    Enter the “Start” menu and press “Run”. Next, type “cmd” in the “Run” search bar. Do remember to click “Enter” button.
  • Windows 2000 Command

  • Windows 7/Vista:
    Open the “Start” menu and type “cmd” in the search field. Alternatively, go to “All Programs” > “Accessories” > “Command Prompt” like below. Do select to “Run as Administrator”.
  • Windows 7 Command

  • Windows 8.1/8:
    On the keyboard, press “Windows” key + “X” in order to enter the “WinX” menu. Then, right-click the “Command Prompt” option and click to “Run as Administrator”.
  • Windows 8 Command

Step 2: Now, it’s time to implement the DNS flush command. Simply type the following command in the “Prompt” window and then press “Enter” key.

ipconfig /flushdns

If successful, a message saying “Successfully flushed the DNS Resolver Cache” will appear onscreen.

Successfully Flushed DNS Cache

To verify whether the DNS cache of your computer has been flushed or not, just type in the command in the following screenshot.

Verify DNS Cache

If the “DNS Resolver Cache” cannot be displayed, the chances are that there is nothing left in the cache and the DNS flush goes smoothly as expected.

Step 3: To exit your “Command Prompt” window, only type in exit and then click the “Enter” key.

Exit the Command Prompt

Need-to-Know Tips for New Starters

  • Disable DNS caching permanently. To do this, you only need to enter services.msc in either the search field or “run” box inside the “Start” menu. It depends on what version of Windows you’re running. From this pop-up window, search “DNS Client” and double-click on it.

    Stop DNS Client

    Press the “Stop” button. If you want to enable DNS caching again, just repeat the above-mentioned steps but click “Start” rather than “Stop”.

  • Disable DNS caching temporarily. To do so, open “cmd” and type the command net stop dnscache within the “Command Prompt”. After that, click “Enter”. This would halt the DNS caching until the next time you reboot the computer.
  • Disable Cache Temporarily