How to clear DNS cache for Windows?

As computer users, we experience internet connection problems many times. Although these problems are usually caused by our internet provider, sometimes we may experience problems with DNS (Domain Name System). For example, having a DNS cache that is too long is a problem that can slow down the internet. The solution to such problems is actually quite simple.

What is DNS?

With its full name, Domain Name System is basically an index of all website domain names in the world. This system, which forms an important part of the way the Internet works, allows you to establish the connection by associating a domain name with IPs. Also, to speed up the connection, Windows DNS cache so that the computer memorizes the domain name tied to a specific IP address and faster provides a link. But DNS-related problems start right here.

DNS cache can get corrupted or slow things down by storing a lot of unnecessary information over the years. In addition, it may cause possible connection errors. Fortunately, it is very easy to fix this corrupted system, that is, to clear the cache that is kept. There are multiple ways to do this, and we’ve compiled them for you.

How to clear cache in Windows 11?

How to clear cache in Windows 11?

Clearing the cache and other temporary files can be quite helpful if you need to free up some space on your Windows 11 computer.

How to clear DNS cache with run command?

Probably the easiest way to clear the DNS cache on the computer is the “Run” command.

  • 1- Press Windows and R keys to open the Run command.
  • 2- Open part ipconfig /flushdns in summer.
how to clear dns cache
  • 3-Press Ctrl + Shift + Enter to run the command as administrator.
  • 4-Click the “Yes” button in the question that appears.

DNS cache flushing using Windows Terminal

Another way to clear the DNS cache in Windows 11 is to use the Windows Terminal. With this tool you can run both Windows Powershell and CMD (Command Prompt) and use both profiles.

  • 1- Right-click the Start menu on your taskbar and click the Windows Powershell (administrator) button.
how to clear windows powershell dns cache
  • 2- According to your profile (for Windows Powershell) Clear-DnsClientCache – (for CMD) ipconfig /flushdns in summer.
  • 3- Your DNS cache will be flushed and a confirmation message will appear in Command Prompt.

DNS cache flush with .bat extension

Another way to clear the DNS cache is to get a .bat file from the notebook. Although it uses the same command in other ways, it may make your job a little easier as you can run it again if needed in the future.

  • 1- Open Notepad.
  • 2- To the opened notebook ipconfig /flushdns in summer.
notebook
  • 3- Click File from the top left and select the Save As button.
  • 4- Select Save as type as All Files.
  • 5- The end of the file regardless of the name .bat put the extension.
save as
  • 6- After saving, right click on the file and run as administrator.

Your DNS cache will be cleared this way. As long as you don’t lose the file, you can always run it again and clear your DNS cache.

“How to clear DNS cache?” This is the answer to the question. So what do you think about this news? Do not forget to share your views with us in the Comments section.

source site-29