Clear Windows DNS Cache (Server & Workstations)

Clear Windows DNS Cache (Server & Workstations)

A DNS cache is akin to a temporary directory that stores the history of websites you’ve recently visited. In most cases, it is kept up to date by your computer’s operating system. It is generally advisable to clean the DNS on a regular basis.

When you visit a website, DNS converts domain names into IP addresses. The entire process takes time and reduces page load times. In such instances, the DNS cache comes into play. For speedier name resolution, the DNS cache will retain your last visited website in memory for a certain amount of time.

There are various reasons why you should clear the DNS cache. Some of them are as follows:

  • Cyber attackers will be unable to access the items in your DNS cache database if you flush the DNS cache.
  • Cookies are used by certain websites to track visitor behavior. Clearing the DNS cache will assist you in protecting your browsing history.
  • You may occasionally encounter web application or internet connectivity difficulties. This can be resolved by emptying the DNS cache.

In this article, we’ll teach you how to clean or flush the DNS cache on Windows.

Windows 10 DNS Cache Cleaning

To clear the DNS cache, follow the instructions below.

Step 1: Log out of your web browser.
Step 2: Right-click Windows CMD and select Run as administrator.
Step 3: Enter the command ipconfig /flushdns and press Enter to flush the DNS, as seen below:

DNS cache

You may also use the following command to view the DNS resolver cache:

ipconfig /displaydns

DNS cache

Clear the DNS cache on your Windows DNS server

If your Windows Server has a DNS server installed and configured. Then, from the DNS panel, clear the DNS cache.

To begin, launch the DNS console from the server manager, right-click on the DNS server, and then select clean cache, as shown below:

DNS cache

PowerShell may be used to clear the DNS cache.

You may also use PowerShell to clean the local DNS client and server cache.

To clear the local DNS server cache, for example, use the following command:


DNS cache

Run the following command to remove the client cache:


Run the following command to remove the DNS cache on a specific DNS server:

Clear-DnsServerCache -ComputerName “computer-name” -Force

To verify DNS resolution, you may also use the nslookup command-line program.

nslookup DNS-IP


In the preceding guide, you learned what a DNS cache is and why and how to clear the DNS cache on a Windows server. I hope this aids you in troubleshooting DNS-related difficulties.

Leave a Reply