How to Display Your DNS Resolver Cache in Windows
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.
Viewing the contents of your DNS 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 7, Windows 8, and Windows 10.
ipconfig /displaydns Output Explained:
Output Description 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". 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. 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.
Contents
- Option One: To Display DNS Resolver Cache in Command Prompt
- Option Two: To Export DNS Resolver Cache to a .txt File
1 Open a command prompt.
2 Copy and paste theipconfig /displayDNS
command into the command prompt, and press Enter.
3 You will now see the contents of your DNS cache.
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.
1 Open a command prompt.
2 Copy and paste the command below into the command prompt, and press Enter. (see screenshot below)
3 You will now have a DNS_cache.txt file on your desktop.
4 You can open the DNS_cache.txt file to see the contents of your DNS cache.
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.
That's it,
Shawn Brink