How to View and Clear DNS Cache in Windows 11
The DNS resolver cache in Windows 11 temporarily stores IP addresses of recently visited websites to speed up future connections. Over time, outdated or corrupted records can cause connection errors or display old website content. This guide explains how to quickly view the cached DNS entries and flush (clear) the DNS cache using built-in Windows tools to resolve networking issues.
How to View the DNS Cache in Windows 11
You can view all currently stored DNS records using either Command Prompt or Windows PowerShell.
Press the Windows Key + S, type
cmdorpowershell, and press Enter.In the console window, type the following command and press Enter:
ipconfig /displaydnsA list of all cached domain names, their corresponding IP addresses, and record types will scroll through the terminal.
Tip: Because the output can be very long, you can export the results directly to a text file on your desktop by running:
ipconfig /displaydns > "%USERPROFILE%\Desktop\dns_cache.txt"How to Clear (Flush) the DNS Cache in Windows 11
Clearing the cache forces your computer to request updated IP addresses directly from your DNS server.
Method
1: Using the ipconfig Command (Command Prompt or
PowerShell)
Press the Windows Key + S, search for Command Prompt (or PowerShell), and click Run as administrator.
Type the following command and press Enter:
ipconfig /flushdnsYou will see a confirmation message: “Successfully flushed the DNS Resolver Cache.”
Method 2: Using a PowerShell Cmdlet
Right-click the Start button and select Terminal (Admin) or open PowerShell as administrator.
Type the following cmdlet and press Enter:
Clear-DnsClientCachePowerShell will execute the command silently. If no error appears, the cache has been cleared successfully.