Home >Common Problem >How to display all cached DNS entries on Windows 11

How to display all cached DNS entries on Windows 11

王林
王林forward
2023-05-21 13:01:191829browse

The Windows operating system uses a cache to store DNS entries. DNS (Domain Name System) is the core technology of the Internet used for communications. Specifically the IP address used to look up domain names.

如何在 Windows 11上显示所有缓存的 DNS 条目

#When a user types a domain name into their browser, one of the first tasks performed when a site loads is to find its IP address. This process requires access to a DNS server. Typically, the Internet Service Provider's DNS servers are used automatically, but administrators may switch to other DNS servers because they may be faster or provide better privacy.

Switching DNS providers may also help bypass Internet censorship if DNS is used to block access to certain sites.

Windows uses DNS resolver caching to speed up lookups. Each DNS lookup is added to the cache to speed up continuous access to the domain. Sometimes, entries can become old and may point to the wrong IP address. Our tutorial for troubleshooting browser hosting issues still works today. Reloading can help because it clears all cached items and starts loading again.

Show all cached DNS entries

如何在 Windows 11上显示所有缓存的 DNS 条目

The cache entry list can be used for a variety of purposes. Webmasters and developers can check that properties are assigned the correct IP addresses, and users may be interested in viewing all entries, for example, to find out which domains were visited during a session.

  1. Use the shortcut Windows-R to open the run box.
  2. Type cmd.exe and press Enter.
  3. Type ipconfig /displayDNS to run the command.

Windows returns all cached DNS entries in a long list. You can also redirect the output to a plain text file by running the command ipconfig /displayDNS > %USERPROFILE%\Desktop\dns.txt. This will save the output to the file dns.txt on your desktop.

The same command can also be run using PowerShell:

  1. Open Start, type PowerShell and select the result. If you have terminal installed, type terminal and select the result.
  2. Run the commandpowershell "Get-DnsClientCache | Format-Table -AutoSize".

Output uses better format. You can also use the command powershell "Get-DnsClientCache | Format-Table -AutoSize" >%USERPROFILE%\Desktop\DNS.txt to redirect the output to a text file.

The above is the detailed content of How to display all cached DNS entries on Windows 11. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:yundongfang.com. If there is any infringement, please contact admin@php.cn delete
Previous article:How to clean AirPodsNext article:How to clean AirPods