×

A DNS cache is very similar to a temporary directory that contains the history of your recently visited websites. Generally, it is maintained by the operating system of your computer. It is always recommended to clear the DNS regularly.

When you visit any website DNS will convert the domain names into IP addresses. The entire process is time-consuming and reduces your page load times. In that case, DNS cache comes into the picture. DNS cache will store your recently visited website in the memory for a certain period of time for faster name resolution.

There are several reasons to flush the DNS cache. Some of them are listed below:

  • Flushing the DNS cache will prevent cyber attackers from accessing the entries in your DNS cache database.
  • Some website uses cookies to monitor visitor’s behaviour. Clearing the DNS cache will help you to protect your surf history.
  • Some times you will experience web application or internet connectivity issues. You can resolve this by clearing the DNS cache.

In this tutorial, we will show you how to clear or flush the DNS cache on Windows.

Clear DNS Cache on Windows 10

You can follow the below steps to clear the DNS cache.

Step 1 : Close your web browser.
Step 2 : Right-click on Windows CMD and click on run as an administrator.
Step 3 : Type ipconfig /flushdns command and press Enter to flush the DNS as shown below:

You can also display the DNS resolver cache with the following command:

ipconfig /displaydns

Clear DNS Cache on Windows DNS Server

If you have DNS server installed and configured on the Windows Server. Then, you can clear the DNS cache from the DNS panel.

First, open the DNS console from the server manager, right-click on the DNS server and select clear cache as shown below:

Clear DNS Cache with PowerShell

You can also clear the local DNS client and server cache using the PowerShell.

For example, to clear the local DNS server cache, run the following command:

Clear-DNsServerCache

To clear the client cache, run the following command:

Clear-DnsClientCache

If you want to clear the DNS cache on a specific DNS server, run the following command:

Clear-DnsServerCache -ComputerName "computer-name" -Force

You can also use the nslookup command-line utility to test the DNS resolution.

nslookup DNS-IP

Conclusion

In the above guide, you learned what is DNS cache, and why and how to clear the DNS cache on the Windows server. I hope this will helps you to troubleshoot DNS related issues.