Windows DNS Cache: How It Works, View It & Flush It

The complete reference for Windows' system-wide DNS caching layer, the DNS Client service behind it, and the exact commands to inspect and clear it.

📅 Published August 2026· ⏳ 15 min read· ✍️ ToolsNovaHub Editorial Team

Windows maintains a single system-wide DNS cache shared by every application on the machine, managed by a background service most users never directly interact with. Understanding how it works — and the two commands that expose it — resolves a large share of "why isn't this working on my PC" DNS confusion.

⭐ ToolsNovaHub Pro Tip
Run ipconfig /displaydns before flushing, not just after — comparing the before-and-after output confirms the flush actually worked and shows you exactly what was cleared, which is far more useful during a genuine troubleshooting session than flushing blindly.
⚠️ Common Beginner Mistake
Running ipconfig /flushdns and expecting a website's changes to appear for every visitor immediately. This command only clears your own machine's local cache — every other resolver on the internet, including your ISP's, is completely unaffected by it.

📝 Introduction

Windows resolves DNS queries through a single centralized service that every application on the system relies on, rather than each app maintaining its own separate cache. This centralization is convenient — one flush clears the cache for every browser, app, and background process at once — but it also means a single misbehaving cached entry can affect everything on the machine simultaneously until it's cleared.

⚙️ The Windows DNS Client Service

The DNS Client service (internally named Dnscache) is the Windows background service responsible for the entire local DNS caching mechanism. It intercepts DNS requests from every application, checks its own cache first, and only reaches out to the network-configured resolver on a cache miss. If this service is stopped or misconfigured, the caching behavior described throughout this guide — and the commands used to inspect and control it — won't function as expected.

🔍 Viewing the Cache: ipconfig /displaydns

Open Command Prompt and run ipconfig /displaydns to list every currently cached DNS record on the system, including the record name, type, and remaining time-to-live. This is the single most useful command for confirming exactly what Windows currently believes about a domain before you go further into troubleshooting.

📜 Reading the Output

Each entry in the displaydns output shows the record name, its record type, the time-to-live remaining in seconds, and the cached data itself — typically an IP address for an A or AAAA record. A record with a very low remaining TTL is about to be re-queried on its next lookup; a record showing "Negative" status indicates Windows has cached that the lookup previously failed, worth noting separately from a normal successful cache entry.

🗑️ Flushing the Cache: ipconfig /flushdns

Running ipconfig /flushdns clears every currently cached entry, forcing the next lookup for each domain to be resolved fresh from the network-configured resolver. This is the standard first step recommended in nearly every Windows DNS troubleshooting guide, and for good reason — it's fast, harmless, and immediately rules out a stale local cache as the cause of whatever issue is being investigated.

❌ Negative Caching on Windows

Windows caches failed DNS lookups just as it caches successful ones, which means a domain that briefly failed to resolve due to a misconfiguration elsewhere can continue appearing to fail locally for a period afterward, even once the underlying issue is fixed — running ipconfig /flushdns clears this negative cache entry alongside everything else, which is often the actual fix in this specific scenario.

🛠 DNS Client Service Configuration

Advanced users and system administrators can adjust DNS caching behavior through registry settings governing maximum cache entry TTL, negative cache TTL, and related parameters — changes generally reserved for specific troubleshooting or hardening scenarios rather than everyday use, since default Windows caching behavior is well-tuned for typical use cases.

💻 PowerShell Equivalents

PowerShell offers equivalent functionality through Get-DnsClientCache for viewing cached entries in a more structured, filterable format than the plain-text ipconfig output, and Clear-DnsClientCache for flushing — useful when scripting DNS diagnostics as part of a larger automated troubleshooting or monitoring routine.

⚖️ Smart Multi-Homed Name Resolution

Windows has a historical networking feature that queries DNS across every active network adapter simultaneously and accepts whichever response returns first, aimed at resilience on multi-interface systems but relevant to be aware of specifically in VPN contexts, where it can interact with DNS routing in ways that affect which resolver actually answers a given query — see our VPN DNS Leak guide for that specific scenario.

🖥️ Windows Server vs Windows Client Differences

Windows Server editions running the DNS Server role maintain a considerably more sophisticated caching and resolution architecture geared toward serving many clients at scale, distinct from the simpler local caching described in this guide for desktop Windows editions — administrators managing DNS infrastructure on Windows Server should consult Microsoft's server-specific documentation for cache configuration options beyond the scope of a single-machine client cache.

📊 Comparison Tables

CommandPurpose
ipconfig /displaydnsView current DNS cache contents
ipconfig /flushdnsClear the entire DNS cache
Get-DnsClientCachePowerShell equivalent of displaydns
Clear-DnsClientCachePowerShell equivalent of flushdns

🏢 Enterprise & IT Team Considerations

IT teams supporting a fleet of Windows machines should include DNS cache flush as a standard early step in any DNS-related support ticket, ideally scriptable via PowerShell's Clear-DnsClientCache for remote or bulk execution across many machines simultaneously rather than requiring individual manual intervention on each device.

❌ Common Mistakes

⚠️ Assuming flushdns affects anyone else's machine
It only clears the local cache on the machine it's run on.
⚠️ Ignoring negative cache entries as a possible cause
A previously failed lookup can keep failing locally even after the underlying issue is resolved.
⚠️ Not checking displaydns output before flushing
Skips a useful diagnostic step that could confirm the actual cause.

✅ Command Reference Checklist

  • Run ipconfig /displaydns first to see current state
  • Run ipconfig /flushdns to clear the cache
  • Re-run displaydns to confirm the flush worked
  • Use PowerShell's Clear-DnsClientCache for remote/bulk operations

🎓 Expert Tips

🔍
Check Before You Flush
displaydns first confirms what's actually cached before you clear it.
💻
Script It for Fleets
Clear-DnsClientCache scales far better than manual per-machine flushing.
Watch for Negative Entries
A failed lookup can keep failing locally well after the real cause is fixed.

💼 Daily Practical Use Cases

Support engineers use these commands as a first-line troubleshooting step for nearly any reported connectivity issue on a Windows machine. System administrators build DNS cache flushing into deployment scripts following infrastructure changes. Networking students use displaydns hands-on to see caching behavior concretely rather than only conceptually.

📚 Glossary

TermDefinition
DNS Client Service (Dnscache)The Windows background service managing local DNS caching
Negative Cache EntryA cached record of a previously failed DNS lookup
Reviewed by: ToolsNovaHub Editorial Team📅 Last updated: August 2026📜 Sourced from: Standard Windows DNS Client service documentation and command behavior

ToolsNovaHub tools are built and independently maintained with a focus on accurate, no-signup network and security utilities. Spotted an error? Let us know.

📋 Related Tools & Guides Comparison

ResourceTypeLink
DNS Cache CheckerToolOpen Tool →
Browser DNS CacheGuideRead Guide →
Linux DNS CacheGuideRead Guide →
macOS DNS CacheGuideRead Guide →
Flush DNS CommandsGuideRead Guide →
Check live DNS cache status — 100% free
🚀 Open DNS Cache Checker

FAQ

ipconfig /displaydns lists every currently cached DNS record along with its remaining TTL.
ipconfig /flushdns clears all currently cached entries, forcing fresh lookups.
Typically not, though running Command Prompt as administrator is good general practice.
The background service (Dnscache) responsible for the entire local DNS caching mechanism.
Yes — a failed lookup can keep failing locally for a period even after the underlying issue is fixed elsewhere.
Yes — Get-DnsClientCache and Clear-DnsClientCache offer more structured, scriptable equivalents.
No — it only clears the cache on the local machine it's run on.
No — Server editions running the DNS Server role use a considerably more sophisticated architecture.
Yes — PowerShell's Clear-DnsClientCache is well-suited to scripted, bulk execution.
Yes — it confirms what's actually cached and helps verify the flush worked afterward.

🔗 More Guides