Flushing your DNS cache tells your computer to forget every DNS answer it has stored and look each name up fresh on next use. It is the right fix when your machine is holding a stale record after a change. It is the wrong fix — and a common source of confusion — when the stale answer lives in a resolver or cache you do not control. This guide gives the exact commands per platform and then explains where flushing actually helps.
What a flush does and does not do
Your operating system keeps a small local cache of recent DNS lookups so it does not re-query for every connection. Flushing empties that local cache. On the next lookup your machine asks its configured resolver again.
- It clears: the stub/OS cache on the machine you run it on.
- It does not clear: the cache on your router, your ISP's recursive resolver, a public resolver like
8.8.8.8, your browser's own DNS cache (separately), or anyone else's machine. - It does not shorten TTL: the upstream resolver still holds its copy for the record's remaining TTL. A flush on your laptop cannot force Google's resolver to forget an answer — only its TTL can.
So if a change looks correct from your phone but wrong from your laptop, flush the laptop. If it looks wrong everywhere, the authoritative record or an upstream cache is the issue — check it from multiple locations with Propagation Studio rather than flushing local caches in a loop.
Windows
Open Command Prompt or PowerShell and run:
ipconfig /flushdns— clears the Windows DNS Client (Dnscache) resolver cache.
You should see "Successfully flushed the DNS Resolver Cache." To inspect what is cached before flushing, use ipconfig /displaydns. If entries return immediately and stubbornly, confirm the DNS Client service is running and that a VPN client is not layering its own resolver on top.
macOS
On modern macOS (10.11 El Capitan onward) run both commands together in Terminal — one clears the directory-services cache, the other nudges the multicast DNS responder:
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
You will be prompted for your password. There is no confirmation message; silence means success. Both halves matter: dscacheutil -flushcache alone does not always fully reset resolution, and signalling mDNSResponder is what makes the change take effect.
Linux
Linux has no single cache — it depends on what resolver runs locally, so identify yours first:
- systemd-resolved (Ubuntu, Fedora and most modern distros):
resolvectl flush-caches(older syntax:systemd-resolve --flush-caches). Check statistics withresolvectl statistics. - dnsmasq: it caches in memory, so restart the service —
sudo systemctl restart dnsmasq. - nscd (Name Service Cache Daemon):
sudo systemctl restart nscd, orsudo nscd -i hoststo invalidate just the hosts cache. - BIND / Unbound as a local resolver:
sudo rndc flushfor BIND, orsudo unbound-control flush_zone example.comto drop a single name from Unbound.
Many minimal Linux setups run no caching resolver at all, in which case there is nothing local to flush — every lookup already goes upstream.
Browsers
Browsers keep their own in-process DNS cache separate from the OS, so a page can stay stale even after an OS flush:
- Chrome / Edge / Brave: visit
chrome://net-internals/#dns(oredge://net-internals/#dns) and click Clear host cache. Fully quitting and reopening the browser has the same effect. - Firefox: restart the browser; for a hard reset, toggle
network.dnsCacheExpirationinabout:configor clear it via the network tools. - Watch for DNS-over-HTTPS: if the browser has DoH enabled it resolves through its own encrypted resolver (often Cloudflare or a provider default), bypassing your OS entirely. An OS flush will not affect those answers — clear the browser's cache or disable DoH to test.
Public resolvers: purge upstream caches
When the stale copy sits in a big public resolver, the operators provide self-service purge tools that drop a name from their cache immediately rather than waiting out the TTL:
- Google Public DNS: the "Flush Cache" tool at
dns.google/cachelets you clear a specific name and record type from8.8.8.8. - Cloudflare: the purge tool at
1.1.1.1/purge-cachedoes the same for1.1.1.1. - OpenDNS: offers a cache-refresh page for its resolvers.
These only affect that one provider. You cannot purge your ISP's resolver — there you simply wait for the TTL to expire, which is exactly why lowering TTL before a change (see lowering TTL before a migration) beats flushing after the fact.
When flushing is not the answer
Reach for a different tool if:
- The record is wrong at the source. Confirm the authoritative value with DNS Studio; if it is wrong there, no amount of flushing helps.
- Only some locations are stale. That is normal TTL-driven propagation, not a caching bug — watch it converge in Propagation Studio.
- A
CNAMEchain or DNSSEC validation is misbehaving. Trace the alias with CNAME Studio or check the signing chain with DNSSEC Studio rather than clearing caches.
In short: flush your own machine and browser when you know the change is correct upstream and you just want to see it now. For everything beyond your own device, TTL — not the flush command — is what sets the clock.