Instructions on how to manage DNS Cache on Windows computers

Born in 1984, Domain Name Server (or DNS for short) is an extremely important component in the technology world in general and the Internet in particular.

Even if you are a person who is not an expert in technology, Internet, or Website design, you must have heard the term DNS a few times, right?

Yes, it is what makes it easy to access websites, you just need to type the domain name of the website you want to visit instead of having to type in a range of IP addresses with a long string of numbers. and hard to remember.

You may not know, each website itself will have a range of IP addresses to access, for example techtipsnreview has an IP address of 192.124.249.159.

But thanks to DNS, you don’t have to remember that range of IP addresses, you just need to type in techtipsnreview and you’re done.

And when it works, the information that the DNS system used before will be saved in the DNS Cache on the Windows operating system. So in this article, I will show you how to manage DNS Cache on Windows (on/off, view, delete ..) effectively.

cach-quan-ly-dns-cache-tren-windows-10 (1)

I. How to Manage DNS Cache on Windows

#first. What is DNS?

As I said above, each website will be placed on a server or hosting with a separate IP address and when you want to access that website, you must type in the address bar of your web browser this IP range. .

The reason is because that domain name has been pointed to the IP address of the server containing the website by DNS, now DNS acts as a tool to translate domain names into IP ranges for computers to understand and help us. access the desired website.

See more:  Bring macOs Spotlight Search to Windows 10

DNS Cache are files containing the IP list of websites that you frequently visit such as Facebook, Youtube, Instagram, techtipsnreview … it is saved on your computer or on the ISP side, helping the DNS resolution process take place. out faster.

cach-quan-ly-dns-cache-tren-windows-10 (2)

#first. View Windows 10 DNS Cache Contents Using Command Prompt

Command Prompt (CMD) can help us do a lot of things on the Windows operating system and this case is no exception. This is also the main method to help you view the contents of DNS Cache files on Windows computers.

Perform:

First, press Windows + S to open Windows Search => then search with the keyword CMD => right-click Command Prompt => select Run as Administrator to open Command Prompt with Administrator rights on Windows.

cach-quan-ly-dns-cache-tren-windows-10 (3)

The Command Prompt window appears, enter the command line ipconfig /displaydns => then Enter to view DNS Cache on Windows.

A series of result lines will appear as shown below, I will explain what each one means and it is actually quite confusing, requiring you to have a bit of knowledge about website design, domain names, DNS things. again :

  • Record name : Name of the Record for which you made the DNS query
  • Record type : Record type, has many types and is displayed as numbers or letters. In this case, 28 is the AAAA type to point to the server’s IPv6 only => one of the most important record types.
  • Time To Live : The time that the Name Servers are kept in the DNS server’s cache.
  • Data Length : Length of data in bytes, with IPv4 addresses being 4 bytes and 16 bytes for IPv6
  • Section : Reply to DNS query
  • Additional : Additional information needed to find the answer in Section
  • CNAME : stands for Canonical Name, a type of Record like AAAA above.
See more:  6 ways to open Services Management Console on Windows 10

cach-quan-ly-dns-cache-tren-windows-10 (4)

And if you want to save this information to a file .txt then you do not need to copy by hand, but instead you can use the command ipconfig /displaydns > C:dnscache.txt in Command Prompt.

In there C:dnscache.txt is the place to save the file containing the DNS Cache content, now you just have to go here to get it to use.

cach-quan-ly-dns-cache-tren-windows-10 (5)

==//read more//==

In addition to the Command Prompt tool, you can completely use Windows PowerShell – a powerful tool no less than CMD – to do this.

Perform: Press the key combination Windows + X, or right click on the . button Start in the Taskbar => and select Windows Powershell (Admin) to open this application with Admin rights if you leave the Taskbar setting as default.

NOTE: Or you can also use Windows Search to open similar to CMD I instructed above.

cach-quan-ly-dns-cache-tren-windows-10 (6)

Because the command structure of Command Prompt and Windows PowerShell are different, instead of using the command above, use this command to view Windows DNS Cache information:

Get-DnsClientCache

PowerShell will also display the same content as in Command Prompt but in columns, not individually, as for what they are, I do not explain anymore, you can see for yourself using the command below Please !

Help Get-DnsClientCache -full

cach-quan-ly-dns-cache-tren-windows-10 (7)

==//end of further reading//==

#2. How to clear DNS Cache on Windows

Why clear DNS Cache on Windows operating system?

The reason for taking up space on the hard drive, I will ignore, because it is insignificant, takes up very little compared to today’s hard drive space, so we will ignore this issue.

The main reason that I recommend you to clear DNS Cache from time to time is because it is a target for hackers and bad guys to attack, the 2 most common methods to do that are: DNS Cache Spoofing – spoof DNS Cache and DNS Cache Poisoning.

I don’t know the details, just know that they can use DNS Cache to attack your Windows computer and it’s as dangerous as a virus.

See more:  Fix Windows error showing wrong time when running Dual Boot with Ubuntu

How to delete DNS Cache on Windows is very simple, you also open Command Prompt with Admin rights as instructed at the beginning of the article => then paste the command below in => and press Enter.

ipconfig /flushdns

If you press Enter and run the command, but the results are returned as shown below, it means that you have successfully cleared DNS Cache..

cach-quan-ly-dns-cache-tren-windows-10 (8)

#3. Enable/disable DNS Cache on Windows operating system

Previously, to disable or enable DNS Cache on Windows computers, you just had to run the command line net stop dnscache and net start dnscache respectively in the Command Prompt is okay.

But now these 2 commands no longer work for new versions of Windows like Windows 10, Windows 11.

Now the only way to turn it off DNS Client Service of this DNS Cache, in general disabling this service has no effect on Windows except for some software and services that depend on DNS Client Service this to work will error.

II. Epilogue

Okay, so I’ve just finished sharing with you the ways to Manage DNS Cache on Windows okay then.

Hope this article can bring you useful information. If you find this article good, don’t forget to share it to help the blog grow. Good luck !

CTV: Nguyen Thanh Tung – techtipsnreview

The article achieved: 5/5 stars – (There is 1 review)

Note: Was this article helpful to you? Don’t forget to rate the article, like and share it with your friends and family!


Source: Instructions on how to manage DNS Cache on Windows computers
– TechtipsnReview

Leave a Reply

Your email address will not be published. Required fields are marked *