A DNS (Domain Name System) resolver cache is a temporary database, maintained by Windows, that contains records of all your recent visits and attempted visits to websites and other Internet domains.
The Internet relies on the Domain Name System (DNS) to maintain an index of all public websites and their corresponding IP addresses. Every time a user visits a website by its name (such as "tenforums.com"), the user's web browser initiates a request out to the Internet, but this request cannot be completed until the website name is converted into an IP address.
This conversion process is called name resolution and is the job of DNS, but it takes time. A DNS cache attempts to speed up the process by handling the name resolution before the request is sent out to the Internet.
If the IP address of a website changes before your DNS cache updates, you may not be able to load the webpage. If you are running into a lot of Page Not Found errors and you know you are connected to the Internet, you could try flushing your DNS cache to have your computer request new information.
The ipconfig /displaydns or Get-DnsClientCache command displays the contents of the DNS client resolver cache, which includes both entries preloaded from the local Hosts file and any recently obtained resource records for name queries resolved by the computer. The DNS Client service uses this information to resolve frequently queried names quickly, before querying its configured DNS servers.
Viewing the contents of the DNS Resolver Cache may help in troubleshooting to verify name resolution and IP.
This tutorial will show you how to view the contents of your DNS Resolver Cache in Windows 11 and Windows 10.
Open Windows Terminal, and select Command Prompt.
Copy and paste the command below you want to use into Windows Terminal, and press Enter. (see screenshots below)
powershell "Get-DnsClientCache | Format-Table -AutoSize"
ipconfig /displayDNS >%USERPROFILE%\Desktop\DNS_cache.txt
powershell "Get-DnsClientCache | Format-Table -AutoSize" >%USERPROFILE%\Desktop\DNS_cache.txt
If you see a Could not display the DNS Resolver Cache message, then either item below may be the cause.
1) You just flushed the DNS resolver cache. If so, then the next time you open a web page, the DNS cache will have content again.
2) The DNS Client service has been disabled. If so, then enabling the "DNS Client" service and setting it to Automatic (Trigger Start) and Start (Running) will allow the DNS cache to work again.
|Entry||Specifies the cache entry name.|
|Record Name||This is the name you query DNS for, and the records (addresses or something else) belong to that name.|
|Record Type||This is the type, displayed as a number - although more commonly they are referred to by their names, internally (in the DNS protocol) each has a number. Type 1 is "A" for "address", an IPv4 address. (IPv6 uses type 28, "AAAA", for an address four times as long.) "PTR", type 12, is a "pointer" to a hostname - most commonly used when mapping an IP address back to its name. "CNAME" is "canonical name".|
|Status||Specifies the record status.|
|Time to Live||This is the time in seconds after which the cache entry must expire.|
|Data Length||This is the length in bytes - an IPv4 address is four bytes, IPv6 is sixteen bytes. For CNAME or PTR, Windows displays a static number (either 4 or 8, depending on your system) - this is actually the size of a memory address where the actual text is kept.|
|Data||Specifies the record data.|
|Section||Specifies the record section. The "answer" section of a DNS reply is the actual answer to the query, and "additional" contains information that will likely be needed to find the actual answer.|
|CNAME Record||Domain (will check the address of this domain instead of the domain, CNAME records can have a very long TTL so its useful to avoid unnecessary queries.)|
|A (Host) Record||This is the IPv4 address of the domain name.|
|AAAA Record||This is the IPv6 address of the domain name.|
|PTR Record||PTR records are used in reverse DNS lookups.|