How to Flush DNS: Clear Your DNS Cache on Windows, macOS, Linux and Chrome
You changed a DNS record, or a site moved hosts, and now your own computer stubbornly insists on loading the old version — or refuses to load the site at all. Nine times out of ten, the culprit is a small file your device keeps in memory: the DNS cache. The fix is to flush DNS, which clears that local memory and forces your machine to ask for a fresh answer.
My job here is to stay calm and isolate the cause. I’ll show you exactly what the DNS cache is, why you’d want to clear it, the precise commands to flush DNS on every platform, and — just as importantly — the cases where flushing won’t help at all because the problem lives somewhere else entirely.
What is the DNS cache, and why does flushing it matter?
Every website lives at a numeric IP address, but you type a human-readable name like `example.com`. The Domain Name System (DNS) translates that name into the IP your browser connects to. That lookup takes a small amount of time, so your device saves the answer locally for a while. The next time you visit, it reuses the stored answer instead of asking again. That stored list of recent name-to-IP results is your DNS cache.
Caching is a feature, not a bug — it makes browsing faster and reduces load on DNS servers. But a cache only helps when it holds correct answers. When the real answer changes and your cache still holds the old one, you get a stale entry, and that stale entry is what you flush.
Key Takeaways
• The DNS cache is a local list of recent domain-to-IP lookups your device stores to save time.
• Flushing DNS clears that list so your machine fetches fresh answers on the next lookup.
• Flush when: you changed a DNS record, a site moved, you can’t reach a site that moved, or you suspect a poisoned/corrupt entry.
• The command differs by platform: `ipconfig /flushdns` (Windows), `sudo dscacheutil -flushcache` (macOS), `resolvectl flush-caches` (Linux), `chrome://net-internals/#dns` (Chrome).
• Flushing only clears YOUR device’s memory. It does nothing for global DNS propagation or a server that is actually down.
When should you flush your DNS cache?
There are four situations where clearing the cache is the right move:
- You just changed a DNS record. You updated an A record or moved your site, and your own machine keeps loading the old IP. Your cache is holding the previous answer until its timer expires; flushing skips that wait.
- A site moved and you can’t reach it. The destination changed, but your cached entry still points at the old, now-dead address.
- General connectivity troubleshooting. Errors like `DNS_PROBE_FINISHED_NXDOMAIN` or “server not found” can come from a stale or corrupt cache entry. Flushing is a fast, harmless first step.
- Security and cache poisoning. If a malicious actor managed to slip a bad name-to-IP mapping into your cache (DNS poisoning), flushing wipes it and forces a clean lookup.
Flushing never deletes anything personal — no bookmarks, no passwords, no history. It only clears a temporary list of recent lookups, and your device rebuilds it automatically as you browse.
How do I flush DNS on Windows?
Windows keeps its DNS cache in the DNS Client service. You clear it with the classic `ipconfig` command. This is the famous ipconfig flushdns command most people are looking for.
- Press the Windows key, type `cmd`, right-click Command Prompt, and choose Run as administrator.
- Run the flush command:
“`cmd ipconfig /flushdns “`
You should see: `Successfully flushed the DNS Resolver Cache.`
If you want to confirm the cache is actually empty, or inspect it before flushing, these companion commands help:
“`cmd ipconfig /displaydns “`
“`powershell Clear-DnsClientCache “`
The PowerShell `Clear-DnsClientCache` command does the same job as `ipconfig /flushdns` and is handy in scripts. If a flush doesn’t seem to take effect, restarting the DNS Client service (`net stop dnscache` then `net start dnscache`) forces the issue.
How do I flush DNS on macOS (and “Mac OS X”)?
Apple has changed the exact command several times over the years, which is why searches for flush dns cache mac os x turn up conflicting advice. The reliable modern approach on macOS (Monterey, Ventura, Sonoma, Sequoia, and recent releases) uses two commands together — one clears the directory service cache, the other restarts the multicast DNS responder:
“`bash sudo dscacheutil -flushcache sudo killall -HUP mDNSResponder “`
You’ll be prompted for your administrator password. There’s no “success” message; if the prompt returns cleanly, it worked.
Version notes — because the phrasing matters depending on how old your Mac is:
- macOS 10.10.4 (Yosemite) through current: use both commands above.
- OS X 10.10.0–10.10.3: use `sudo discoveryutil mdnsflushcache` (Apple briefly replaced `mDNSResponder` with `discoveryutil`, then reverted).
- OS X 10.9 (Mavericks) and earlier “Mac OS X”: `sudo killall -HUP mDNSResponder` alone was sufficient.
When in doubt on any modern Mac, run both lines from the first block — running an extra harmless command never hurts.
How do I flush DNS on Linux?
Linux is the one platform where there’s no single universal answer, because different distributions use different DNS caching layers. Find which one you’re running and use the matching command.
systemd-resolved (Ubuntu 18.04+, Fedora, most modern distros):
“`bash resolvectl flush-caches “`
On slightly older systemd versions, the equivalent is:
“`bash sudo systemd-resolve –flush-caches “`
You can verify the cache emptied with `resolvectl statistics` and check the “Current Cache Size” line.
nscd (Name Service Cache Daemon — common on some server distros):
“`bash sudo systemctl restart nscd “`
Or, more surgically:
“`bash sudo nscd -i hosts “`
dnsmasq (used by NetworkManager and many routers/lightweight setups):
“`bash sudo systemctl restart dnsmasq “`
If you’re not sure which caching service is active, `systemctl is-active systemd-resolved nscd dnsmasq` will tell you which one is running, and you flush that one.
How do I flush DNS in Chrome?
Here’s a subtlety many people miss: Chrome keeps its own internal DNS cache, separate from your operating system’s. So you can run `ipconfig /flushdns` and still get the old result inside Chrome, because the browser is answering from its private cache. This is why searches for flush dns chrome exist as a distinct problem.
To clear Chrome’s internal DNS cache:
- Open a new tab and go to:
“`text chrome://net-internals/#dns “`
- Click the Clear host cache button.
For a truly clean slate, also clear the active socket pools, which can hold open connections to the old address:
“`text chrome://net-internals/#sockets “`
- On that page, click Flush socket pools.
The same approach works in other Chromium-based browsers — Microsoft Edge uses `edge://net-internals/#dns`, and Brave uses `brave://net-internals/#dns`. After clearing both the host cache and socket pools, reload the page and Chrome will perform a fresh lookup through your operating system.
What is “google flush dns” and the Google Public DNS flush tool?
When people search google flush dns, they usually mean one of two different things, so let’s separate them:
- Flushing DNS in Google Chrome — that’s the `chrome://net-internals/#dns` method above.
- Flushing a record from Google Public DNS — Google runs the public resolvers at `8.8.8.8` and `8.8.4.4`, and they cache answers globally. If you changed a DNS record and Google’s resolver is still serving the old one to people who use it, you can request that Google purge that specific name from its cache.
For the second case, Google provides a public Flush Cache tool:
“`text https://developers.google.com/speed/public-dns/cache “`
On that page you enter the domain name (and choose the record type, like A or CNAME), tick the boxes, and submit. This asks Google’s public resolver to drop its cached copy of that record and fetch a fresh one from your authoritative nameservers. Cloudflare offers an equivalent purge tool for its `1.1.1.1` resolver.
This is a useful trick after a DNS change — but only for visitors who specifically use that public resolver. It does not flush every resolver on the internet, which is the key limitation we’ll address next.
Flush DNS commands by platform (quick reference)
Keep this table handy — it’s the fast answer for how to flush dns cache on whatever device is in front of you.
| Platform | Command | Notes |
|---|---|---|
| Windows (CMD) | `ipconfig /flushdns` | Run Command Prompt as administrator |
| Windows (PowerShell) | `Clear-DnsClientCache` | Same effect, script-friendly |
| macOS (modern) | `sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder` | Run both lines together |
| macOS 10.9 and earlier | `sudo killall -HUP mDNSResponder` | “Mac OS X” era |
| Linux (systemd-resolved) | `resolvectl flush-caches` | Older: `sudo systemd-resolve –flush-caches` |
| Linux (nscd) | `sudo nscd -i hosts` | Or restart the service |
| Linux (dnsmasq) | `sudo systemctl restart dnsmasq` | Common with NetworkManager |
| Chrome | `chrome://net-internals/#dns` → Clear host cache | Also flush sockets |
| Google Public DNS | `developers.google.com/speed/public-dns/cache` | Purge one record from `8.8.8.8` |
When does flushing DNS NOT help?
This is the part most guides skip, and it’s where I see people waste the most time. Flushing your cache is a precise tool that fixes exactly one class of problem. If your problem isn’t in that class, you can flush all day and nothing will change.
Here is the distinction that saves hours. Flushing DNS only clears YOUR device’s local memory of old lookups. It does *nothing* to global DNS propagation, and it does *nothing* to the website’s server. So it fixes one thing and one thing only: when you changed (or are chasing) a DNS record and your own machine is stubbornly remembering the old answer.
That means flushing is the wrong tool in two very common situations:
- The site is down for everyone. If the server itself is offline or returning errors, there’s no fresh answer for your cache to fetch — the address resolves fine, but the destination isn’t responding. Flushing your cache changes nothing because your cache was never the problem.
- You just updated a record and you’re waiting on the world to see it. That’s DNS propagation, not your local cache. Every resolver on the internet holds its own cached copy until that record’s TTL (time-to-live) expires. You can flush your machine and the Google Public DNS tool above, but you cannot force every ISP and resolver worldwide to drop their copies. That’s a TTL-based, global wait — measured in minutes to hours depending on the TTL you set.
So before you flush, ask: *is the stale answer living in my machine, or out in the world?* If it’s just your machine remembering an old lookup, flush and you’re done. If it’s a server outage or a global propagation wait, flushing is the wrong layer — and knowing that stops you from chasing a fix that can’t work.
A quick test to tell which: load the same site on your phone over mobile data (a different network and resolver). If it works there but not on your computer, the stale answer is local — flush it. If it fails everywhere, the problem is server-side or still propagating, and no flush will help.
How DarazHost keeps stale-cache headaches rare
Tired of guessing whether it’s your cache or real propagation? DarazHost uses sensible DNS TTLs and fast, reliable DNS so your records resolve and update predictably — which means fewer stale-cache headaches for both you and your visitors. And if you’ve just changed a DNS record and you’re not sure whether you’re looking at a local-cache issue or genuine global propagation, our 24/7 support team helps you tell the two apart quickly, so you spend minutes diagnosing instead of hours guessing.
Where flushing DNS fits in the bigger picture
Clearing your cache is one small step in a much larger journey — the path a visitor’s request takes from a typed name to your server. Resolvers, records, nameservers, caching, and propagation all play a part, and the local cache is just the very first hop. To see how every piece connects, read the full pillar guide: Networking and DNS for Hosting: The Complete Guide to How Visitors Reach Your Server.
If your real issue is the world catching up to a change you made, the topic you actually want is . If you’re not sure which records you changed, start with .
Frequently asked questions
Does flushing my DNS cache delete anything important? No. The DNS cache is just a temporary list of recent name-to-IP lookups. Clearing it forces your device to fetch fresh answers next time. Nothing personal is affected — no bookmarks, no saved passwords, no browsing history.
Why does flushing DNS not fix my problem? Because flushing only clears your own device’s memory of old lookups. If the website is down for everyone, or you just changed a record and are waiting on global propagation, the stale answer isn’t in your cache — it’s a server issue or a TTL-based propagation wait. Flushing the wrong layer can’t fix it.
How do I flush DNS in Chrome if `ipconfig /flushdns` didn’t work? Chrome keeps its own internal DNS cache separate from Windows. Go to `chrome://net-internals/#dns` and click Clear host cache, then go to `chrome://net-internals/#sockets` and click Flush socket pools. Reload the page afterward.
What is the Google flush DNS tool for? Google’s public resolvers (`8.8.8.8`) cache records globally. If you changed a record and Google is still serving the old version, the Flush Cache tool at `developers.google.com/speed/public-dns/cache` asks Google to purge that one record and refetch it. It only affects Google’s resolver, not the whole internet.
Do I need to restart my computer after flushing DNS? No. The flush takes effect immediately. You may want to reload any open browser tabs (and flush Chrome’s internal cache separately), but a full reboot isn’t required.
How often should I flush my DNS cache? Only when you have a reason — after a DNS change, when troubleshooting a connection error, or if you suspect a poisoned entry. There’s no benefit to flushing it routinely; the cache is designed to make browsing faster and rebuilds itself automatically.