How to Reset the DNS Cache on Windows (ipconfig /flushdns)

When a website refuses to load the correct page, a domain points to an old server, or a freshly updated DNS record still resolves to a stale address, the culprit is often your computer’s local DNS resolver cache. On Windows, you can clear that cache in seconds with a single command: `ipconfig /flushdns`. Resetting the DNS cache forces Windows to forget previously stored name-to-IP mappings and request fresh data the next time you connect to a site.

This guide walks through the exact commands to flush, view, and re-register DNS entries on Windows, explains when and why you should reset the cache, and clarifies one widely misunderstood point: flushing your machine’s cache does not accelerate global DNS propagation.

Key Takeaways
• Run `ipconfig /flushdns` in Command Prompt or PowerShell to reset the Windows DNS cache. Administrator rights are not required for this command.
• Use `ipconfig /displaydns` to inspect cached records and `ipconfig /registerdns` to refresh your machine’s DNS registration.
• Flush the cache after DNS or hosting changes, server migrations, editing the hosts file, or when troubleshooting stale or incorrect records.
• Flushing clears only your local cache — it does not speed up how quickly the rest of the world sees a DNS change. TTL and propagation still govern that.
• Browsers like Chrome keep a separate DNS cache that may also need clearing.

What Is the Windows DNS Cache?

Every time you visit a domain, Windows asks a DNS server to translate the human-readable name (such as `example.com`) into a numeric IP address. To avoid repeating that lookup constantly, Windows stores the result in a temporary, in-memory store called the DNS resolver cache, managed by the DNS Client service (`dnscache`).

This caching makes browsing faster because repeated visits skip the network round-trip. The trade-off is that cached entries can become stale — if a domain moves to a new server, your computer may keep using the old IP address until the cached entry expires or you manually clear it.

Each cached record carries a TTL (Time To Live), a countdown that defines how long Windows is allowed to trust the entry before discarding it. Flushing the cache simply removes all entries immediately, regardless of their remaining TTL.

How Do You Flush the DNS Cache on Windows?

The standard method uses the built-in `ipconfig` utility. You can run it from either Command Prompt or PowerShell — both work identically for this command.

Step 1: Open Command Prompt or PowerShell

  1. Press the Windows key, type `cmd` (for Command Prompt) or `powershell`.
  2. Press Enter to open it.

For `ipconfig /flushdns`, administrator rights are not required — a standard window is sufficient. However, a few related operations (such as stopping and starting the DNS Client service) do require an elevated session. To open one, right-click the app and choose Run as administrator.

Step 2: Run the Flush Command

Type the following and press Enter:

“`cmd ipconfig /flushdns “`

A successful result returns:

“` Windows IP Configuration

Successfully flushed the DNS Resolver Cache. “`

That confirmation means every cached name-to-IP mapping has been cleared. The next time you visit any site, Windows performs a fresh lookup.

How Can You View the DNS Cache Before Flushing?

Before clearing everything, you may want to inspect what Windows currently has stored. Use:

“`cmd ipconfig /displaydns “`

This prints each cached record with its record name, record type (for example, A or AAAA), TTL value, and the resolved address. Reviewing this list is useful when you suspect a specific domain is resolving to the wrong IP — you can confirm the stale entry exists before flushing.

If the command returns *”Could not display the DNS Resolver Cache,”* the DNS Client service may be stopped, or the cache may simply be empty.

What Does ipconfig /registerdns Do?

The `registerdns` command refreshes all DHCP leases and re-registers your computer’s DNS records with the configured DNS server:

“`cmd ipconfig /registerdns “`

This is most relevant in managed or domain-joined environments where your machine’s own hostname must be correctly registered. It is not the same as flushing — `registerdns` updates how the network knows *your* machine, while `flushdns` clears what *your* machine remembers about others. This command typically requires an administrator session.

DNS Cache Command Reference

The table below summarizes the core commands for managing the Windows DNS cache.

Action Command Requires Admin? What It Does
Flush the cache `ipconfig /flushdns` No Clears all cached name-to-IP entries
Display the cache `ipconfig /displaydns` No Lists current cached records and their TTLs
Re-register DNS `ipconfig /registerdns` Yes Refreshes DHCP leases and re-registers your host records
Stop DNS Client `net stop dnscache` Yes Halts the DNS Client service
Start DNS Client `net start dnscache` Yes Restarts the DNS Client service

When Should You Reset the DNS Cache?

Flushing is a quick, low-risk troubleshooting step. Consider resetting the Windows DNS cache in these situations:

  • After DNS or hosting changes. If you updated a domain’s records — or your provider moved your site to a new server — your local cache may still hold the old address.
  • After a site migration. When a website moves to a new host or IP, flushing ensures your machine fetches the current location.
  • When troubleshooting stale records. If a site loads incorrectly, shows an old version, or returns connection errors that others don’t see, a stale cache entry is a common cause.
  • After editing the hosts file. Changes to the Windows `hosts` file (at `C:\Windows\System32\drivers\etc\hosts`) take effect more reliably after a flush.
  • After switching DNS providers. If you change your resolver (for example, to a public DNS service), flushing removes entries resolved by the previous one.

Why Flush Instead of Waiting?

Cached entries eventually expire on their own when their TTL elapses, so flushing is essentially fast-forwarding that expiry. You flush when you don’t want to wait for the TTL to run down — for instance, immediately after a configuration change you need to verify right away. It clears stale entries so Windows is forced to consult the authoritative source again.

The Misconception: Flushing Does Not Speed Up Propagation

Here is the point that trips up many people who have just changed a domain’s DNS records. Flushing your local cache does not accelerate global DNS propagation.

When you update a DNS record, that change must spread across DNS resolvers worldwide, and each resolver respects the record’s TTL before it requests fresh data. Running `ipconfig /flushdns` clears only your own machine’s cache. It has zero effect on what your colleague across the country sees, what a mobile network in another region resolves, or what any third-party resolver has stored. Those caches expire on their own schedule, dictated by TTL.

In practical terms: flush to confirm *your* view is current after a change, but understand that everyone else’s visibility is still governed by propagation and TTL — not by anything you run locally. Lowering a record’s TTL *before* you make a change is the real lever for faster propagation.

What About Your Browser’s DNS Cache?

Windows is not the only thing caching DNS. Modern browsers maintain their own internal DNS cache that operates independently of the operating system. If you have flushed the Windows cache but a site still loads incorrectly, your browser may be the holdout.

In Chrome, you can clear its internal DNS cache by navigating to:

“` chrome://net-internals/#dns “`

Then click Clear host cache. Other Chromium-based browsers expose a similar page. The practical takeaway: a thorough reset often means flushing both the Windows cache and your browser’s cache.

If you’ve worked through DNS caching on mobile devices, the principle is the same across platforms — see our companion guide on clearing the DNS cache on iPhone for the iOS-specific steps.

How Do You Restart the DNS Client Service?

If flushing alone doesn’t resolve the issue, you can fully restart the DNS Client service. Open an administrator Command Prompt or PowerShell and run:

“`cmd net stop dnscache net start dnscache “`

This stops and restarts the service that manages caching, effectively rebuilding the resolver from scratch. On some Windows configurations the service is protected and cannot be stopped this way; in those cases, `ipconfig /flushdns` remains the reliable option, or you can restart the machine.


When you change DNS records with DarazHost, remember that propagation takes time — governed by each record’s TTL, not by how quickly you flush your local cache. Our hosting platform includes an easy-to-use DNS management interface so you can update A records, CNAMEs, MX records, and more without wrestling with configuration files. And if a change isn’t resolving the way you expect, our 24/7 support team can help you confirm whether the issue is local caching, TTL-driven propagation, or a record that needs adjusting. Reliable DNS handling is part of keeping your sites fast and consistently reachable.

Frequently Asked Questions

Does `ipconfig /flushdns` require administrator privileges? No. The flush command runs fine in a standard Command Prompt or PowerShell window. Some related commands — such as `ipconfig /registerdns` or stopping the DNS Client service — do require an elevated (administrator) session.

Will flushing the DNS cache speed up my DNS changes for everyone? No. Flushing clears only your own computer’s cache. Global propagation is governed by each DNS record’s TTL and how quickly other resolvers refresh. Lowering the TTL before making a change is what helps propagation happen faster.

My site still loads the old version after flushing. What now? Clear your browser’s separate DNS cache (in Chrome, visit `chrome://net-internals/#dns`), clear your browser’s regular cache, and confirm the DNS change has actually propagated. The record’s TTL may not have elapsed yet on the resolver you’re using.

How can I see what’s currently in my Windows DNS cache? Run `ipconfig /displaydns`. It lists each cached record, its type, TTL, and resolved address — useful for confirming a stale entry exists before you flush.

Is it safe to flush the DNS cache regularly? Yes. Flushing is non-destructive — it only clears temporary lookups that Windows will rebuild automatically on the next request. The brief trade-off is that the next few lookups take slightly longer because they go over the network instead of coming from cache.

About the Author

Leave a Reply