- What Is the DNS Cache?
- How to Check DNS Cache on Windows 10
- Via Command Prompt
- Via PowerShell
- How to Clear DNS Cache
- Is It Safe to Flush DNS Cache?
- Clearing DNS Cache Using Command Prompt
- Clearing DNS Cache Using Windows PowerShell
- How to Disable DNS Cache in Windows 10
- How to view DNS cache on Windows 11?
- In Conclusion…
Do you want to learn how to view DNS cache in Windows 10? If so, this tutorial is for you. On a Windows 10 PC, there are several methods you can use to display the DNS contents. First, here’s a summary of what the DNS cache means.
What Is the DNS Cache?
DNS, (Domain Name System) cache, sometimes referred to as DNS Resolver Cache, is a temporary storage of information. It is maintained by your computer, and it contains records of all the recently visited websites and their IP addresses.
It serves as a database that keeps a copy of a DNS lookup, locally stored on your browser or operating system. Your computer can quickly refer to it whenever trying to load a website. The DNS cache is like a phonebook that stores an index of all public websites and their IP addresses. Its main purpose is to speed up a request to load a website by handling name resolution of addresses that you recently visited before the request is sent out to tons of public DNS servers. Since the information is available locally, the process is much quicker.
How to Check DNS Cache on Windows 10
As noted earlier, there are various ways to display DNS cache on Windows 10. This can be useful if you want to diagnose DNS issues, for example, where an invalid or out of date DNS record might be cached.
Via Command Prompt
To display the contents of the DNS cache, you need to execute the following command in an elevated Command Prompt:
- Press the Win + S shortcut keys and type in “cmd” (without quotes).
- Click on Run as administrator on the right pane.
- On the Command Prompt window, type the following command and press Enter:
Upon execution of the command, the following results will be displayed:
- Record Name – This is the name you query the DNS for, and the records, such as addresses that belong to that name.
- Record Type – This refers to the type of entry, displayed as a number (although they are commonly referred to by their names). Each DNS protocol has a number.
- Time to Live (TTL) – This is a value that describes how long a cache entry is valid, displayed in seconds.
- Data Length – This describes the length in bytes. For instance, the IPv4 address is four bytes, and the IPv6 address is 16 bytes.
- Section – This is the answer to the query.
- CNAME Record – This is the canonical name record.
You can export the results of the DNS cache using this command:
ipconfig /displaydns > dnscachecontents.txt
This will save the output in the text document,dnscachecontents.txt.
You can view the DNS cache using Windows PowerShell. And like in Command Prompt, you can also export or save the database. Here’s the procedure:
- Press the Win + X keyboard shortcut, and select Windows PowerShell Admin. Alternatively, if you can’t find that option, press the Win + S shortcut keys, type in “PowerShell” (no quotes) and select Run as Administrator on the right pane.
- Next, input the command“Get-DnsClientCache” (no quotes), and press Enter.
- Use the Get-Help cmdlet to get more information:
Help Get-DnsClientCache –full
How to Clear DNS Cache
When you run into Internet connectivity issues, flushing or clearing the DNS cache usually resolves the problem.
You may want to clear your DNS cache for a varied number of reasons, including:
- When attempting to troubleshoot connectivity issues, where you have difficulty accessing websites and applications: If the domain name in the cache has an incorrect or invalid IP address, the website won’t be able to return the correct information. Even if you clear your browser history, the DNS cache will still contain the old corrupt details. Flushing helps to get the DNS to update the results.
- When attempting to troubleshoot or resolve DNS spoofing or DNS cache poisoning issues: Cybercriminals may try to access the cache and insert or change the IP address, with the intention to redirect you to a website designed to gather sensitive data like passwords and banking details. Clearing the DNS cache prevents this.
- Resolving stale or outdated information about visited sites: An example here would be if a website has moved servers.
Is It Safe to Flush DNS Cache?
It is important to note that flushing the DNS cache doesn’t have any negative impacts on your system. DNS cache ensures quick access to websites, and when you clear it, the first time you visit a website, it may take longer than usual to load. But afterward, the results will be quicker again.
To clear the DNS cache, for whatever reason, you can use a command line or Windows PowerShell.
Clearing DNS Cache Using Command Prompt
- Press the Windows Key + S, and type “CMD” (without quotes).
- Choose the “Run as administrator” option in the right pane.
- Type the following command in the prompt and hit Enter:
That’s it! You should get a notification indicating the cache has been successfully flushed.
If the issue is on the server instead of the local machine, you can still use Command Prompt to clear the DNS cache, but with a different command. In that case, the command would be:
- dnscmd /clearcache
Clearing DNS Cache Using Windows PowerShell
You can also flush the DNS cache using Windows PowerShell. Depending on the type of cache you want to clear, you have a few options to implement:
- To clear the local DNS server cache, use the command line:
- To clear the client cache, use this command:
How to Disable DNS Cache in Windows 10
If for any reason you wish to disable DNS cache on your Windows 10 PC, you can use the “Service Controller” tool to stop the service:
- Press the Win + R keys, type in“services.msc” (no quotes)and press Enter or click OK.
- Locate the DNS Client service (or Dnscache on some computers) and double-click it to open its Properties.
- Change the Startup Type to Disabled.
- To re-enable the service, repeat the steps above and change the Startup Type to Automatic.
Alternatively, you can deactivate the DNS Client using Windows System Configuration:
- Press the Win + R keys, type in“msconfig” (no quotes)in the Run dialog box, and hit Enter or click OK.
- Move to the Services tab and find DNS Client.
- Uncheck the box next to the service and click Apply > OK.
- To re-enable the service, repeat the steps above and tick the checkbox again.
Keep in mind that disabling this service will affect the overall performance of your computer and the network traffic for DNS queries will increase, which means websites will load much slower than normal.
How to view DNS cache on Windows 11?
Windows 11 comes with several substantial upgrades: performance optimization, bug fixes, new placements for the Taskbar and Start Menu — and more. However, when it comes to basic functionality, Windows 11 works in pretty much the same way as Windows 10.
If you are trying to view DNS cache on Windows 11, you can use the same methods we’ve mentioned above for Windows 10. Namely, you can view cache by running elevated Command Prompt or via Windows Powershell — simply go through the steps for both methods described above.
If you are looking to clear DNS cache on Windows 11, you can also follow the same steps as listed above for Windows 10. You can clear the cache by running a command in Command Prompt.
Or, you can do the same via Windows PowerShell.
Follow the steps above for Clearing DNS Cache on Windows 10. You can also follow the same steps for re-enabling the service as well.
Note that if you do decide to disable DNS cache on Windows 11, the overall performance of your system will be affected. The DNS queries traffic will substantially increase and you will notice that a lot of the websites you visit frequently take much longer to load. If you choose to disable DNS cache on your PC, you will also lose the option to view the cache if you need to diagnose an issue on your system.
Like we mentioned above, DNS cache avoids having to lookup DNS each time you visit a website. All you have to do is visit the site once, and upon subsequent requests, your browser or operating system will use the cached DNS details to return requests much quicker.
While clearing the DNS cache is important to protecting your privacy and preventing instances of hacking, it won’t remove all traces of sensitive information. These details include activity history, login details, profile data, and traces of visits to adult websites. Even if you didn’t open them knowingly, you might have been redirected without your knowledge.
To effectively remove such sensitive data and protect your privacy, you need a reliable program like Auslogics BoostSpeed. The tool helps to clear any kind of confidential information that you wouldn’t want anyone to find. BoostSpeed comes with all the tools you might need to keep your PC performing at optimal speeds as well as privacy protection.
You will especially find the features under the “Protect” tab quite useful. Apart from clearing traces of your activities in your web browsers, system files, and applications, there is also an option to protect your DNS from unauthorized changes. This way, you won’t be worried about DNS spoofing, where attackers alter your DNS records to redirect traffic to fraudulent websites.
If you enable Active Browser AntiTracker, your browsing data will be cleared after every browsing session, further safeguarding your privacy. We recommend cleaning up your PC regularly, depending on your usage. Since it’s easy to forget to run maintenance, you can activate an automated scan and choose how often you want the scan to run.
Press the Win + R keys, type in “services. msc” (no quotes) and press Enter or click OK. Locate the DNS Client service (or Dnscache on some computers) and double-click it to open its Properties.How do I view DNS cache in Windows 10? ›
To display the contents of the DNS resolver cache: Type ipconfig /displaydns and press Enter. Observe the contents of the DNS resolver cache.How can you check DNS cache in Windows? ›
Windows: Open your command prompt and enter the command “ipconfig /displaydns.” You should then be able to see the records. Mac: Open the Terminal app, enter the command “sudo discoveryutil udnscachestats,” and input your password. This will display the Unicast DNS cache.What command shows DNS cache? ›
To view the contents of the local DNS cache, open a command prompt window and type in the command “ipconfig /displaydns”. This will display a list of all the domain names and their associated IP addresses that are stored in the local DNS cache. The ipconfig command can also be used to flush the local DNS cache.How do I reset DNS settings in Windows 11? ›
- Press Win + R to launch the Run command box.
- Type “ipconfig /flushdns” command.
- Press Ctrl + Shift + Enter keys at once. The Command Prompt will launch, execute the flush command, and close automatically.
Press the Win + R keys, type in “services. msc” (no quotes) and press Enter or click OK. Locate the DNS Client service (or Dnscache on some computers) and double-click it to open its Properties.How do I see DNS records in Windows 11? ›
Type Command Prompt into the Start menu, then select Run as Administrator from the right pane. Ipconfig /all should be entered into the Command Prompt window. The information displayed on the screen includes the DNS servers.Does Windows 10 have a DNS cache? ›
To improve the speed and performance of your internet connection, Microsoft Windows 10 stores vital domain name resolution information in a temporary file known as the DNS cache.Where is your DNS cache? ›
It is located in /var/cache/nscd/hosts, so you can run “strings /var/cache/nscd/hosts” to display it. If you are using Ubuntu 20.10, Fedora 33, or later, Systemd is responsible for the DNS.Where are DNS records stored Windows 10? ›
dns is located in the %systemroot%\System32\Config folder. You can use a text editor, such as Notepad, to view this file.
Go to Start and type cmd in the search field to open the command prompt. Alternatively, go to Start > Run > type cmd or command. Type nslookup and hit Enter. The displayed information will be your local DNS server and its IP address.How to check DNS history in cmd? ›
Type cmd in the Start menu search bar to open Command Prompt. Then click Run as administrator. Enter the command ipconfig/displaydns and hit Enter. You'll see your detailed DNS cache history.How do I view DNS entries? ›
Use a website that gathers domain information, like WHOIS lookup, to look up public information about your name server. Search your domain name. Enter your domain name in the search field, such as mywebsite.com, and look up the domain information. Look for Name Server information in search results.What is the preferred DNS server for Windows 11? ›
Below the IPv4 or IPv6 headings, enter the primary DNS server address in the “Preferred DNS” box (such as “8.8. 8.8” and “8.8. 4.4” for Google's free DNS service). Below that, enter the secondary DNS server address in the “Alternate DNS” box.How do I manually resolve DNS? ›
- Use a Different Web Browser. ...
- Try Accessing a Website With a Different Device. ...
- Restart Your Router. ...
- Investigate Possible Network Issues. ...
- Manually Set Your DNS Server. ...
- Clear the DNS Cache. ...
- Disable Internet Protocol Version 6. ...
- Temporarily Deactivate your Firewall and Disable Antivirus.
To change your DNS server on a Windows 10 computer, go to Settings > Network & Internet > Change Adapter Settings. Then right-click a connection and select Properties > IPv4 > Properties. Finally,select Use the following DNS server address.How do I check my DNS history? ›
- SecurityTrails. SecurityTrails is one of the top DNS lookup tools. ...
- WhoISrequest. WhoISrequest is another great way to view DNS history for free. ...
- Complete DNS. ...
dns file is commonly located at %windir%\system32\config\netlogon. dns. In addition to these SRV records, you must also have an A record for each domain controller. Microsoft also recommends that you have an A record for the Windows domain's FQDN.Where is local DNS cache stored in Windows? ›
To view the current DNS resolver cache content and the entries preloaded from the Hosts file, go to the command prompt and type C:\> ipconfig /displaydns Each entry shows the remaining Time to Live (TTL) in seconds.What is DNS cache in Windows? ›
A DNS (Domain Name System) cache is a record of all queries made to a DNS server from your browser. When you input an URL into your browser, your browser sends a request to the DNS server asking for the URL's IP address. After your browser receives the IP address, it can then load the correct website in your window.
DNS records are stored in authoritative servers. These records provide information about a domain, including its associated IP address for each domain. It is mandatory for all domains to have a specific set of default records.How to check DNS history in CMD? ›
Type cmd in the Start menu search bar to open Command Prompt. Then click Run as administrator. Enter the command ipconfig/displaydns and hit Enter. You'll see your detailed DNS cache history.Where are DNS server files stored? ›
All of these files are located in the %SystemRoot%\system32\Dns directory, and all except the dummy boot file are built from standard resource records. A name server boot file points to sources of DNS information.