Ever wondered what websites or services your computer has been connecting to in the background? Windows quietly keeps a DNS cache that stores all the domain names it resolves — and this can be a powerful tool for troubleshooting, monitoring, or just understanding your network activity.
Here’s how you can quickly view and manage it using Command Prompt:
🔍 Step 1: Open Command Prompt as Administrator
- Press
Windows + S
and type cmd - Right-click on Command Prompt and choose Run as Administrator
You must run Command Prompt with administrator rights for this to work.
đź“„ Step 2: Display DNS Cache
In the command prompt window, type:
ipconfig /displaydns
This will list all the DNS entries your computer has resolved recently. You’ll see details like domain names, record types, and how long the entry is cached.
đź§ą Step 3: Clear the DNS Cache (Optional)
If you’re troubleshooting or want to clear outdated entries, simply type:
ipconfig /flushdns
You’ll get a confirmation:
“Successfully flushed the DNS Resolver Cache.”
âś… When is this useful?
- Diagnosing suspicious network activity
- Resetting DNS after changes to hosts or DNS settings
- Speeding up site access when domains are cached incorrectly
- Improving privacy by clearing your local history of resolved domains