Skip to content

How to Flush DNS Cache

Educational commands for Windows, macOS, Linux, and browsers. DNS Checkers cannot flush your device remotely.

Flushing DNS clears local caches so your computer asks resolvers again. It does not change records at your DNS host, and no website can remotely flush visitor operating systems. DNS Checkers publishes these commands for education and self-service troubleshooting only — run them on devices you administer.

When flushing helps

You changed DNS, TTL should have expired, public resolvers on the propagation checker look correct, but one laptop still hits the old IP. That machine’s stub resolver or browser host cache is the likely culprit. Flushing is also useful after VPN toggles, corporate proxy changes, or malware cleanups that tampered with resolver settings.

Windows

ipconfig /flushdns

Optionally renew DHCP afterward if you also changed network adapters. Administrators may need an elevated prompt.

macOS

sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder

Exact helpers have varied across macOS releases; if a command is unrecognized, check Apple’s current documentation for your version.

Linux (systemd-resolved)

sudo resolvectl flush-caches

Other stacks (nscd, dnsmasq, unbound) have their own flush mechanisms. Know which daemon your distribution actually uses.

Browsers and routers

Chrome users can open chrome://net-internals/#dns and clear the host cache. Some routers cache DNS aggressively — a reboot or DNS setting change can help after major migrations. Clearing HSTS is a separate, more dangerous step reserved for certificate debugging.

What flushing cannot fix

If authoritative records are still wrong, flushing only makes you discover the bad answer faster. If public resolvers disagree, wait for TTL or fix the zone. Continue with All DNS Records and the blog guide on flushing DNS for narrative context.

Enterprise and school networks

On managed networks you may not control the recursive resolver at all. Flushing the laptop cache still helps, but the upstream forwarder can keep serving stale data until its own TTL expires. In those environments, ask IT whether they run split DNS or intercepting resolvers, and verify with the DNS Checkers public resolver comparison to see whether the problem is local or global.

Mobile carriers and CGNAT paths add another wrinkle: your phone and laptop can egress through different resolvers even on the “same” Wi-Fi after a failover. Flush both devices, toggle airplane mode, and re-check what-is-my-ip if addresses also changed. Keep notes — recurring stale answers often point to a middlebox, not your authoritative zone.

Finally, remember that flushing is reversible curiosity: the worst case is a few extra DNS lookups. Making unauthorized changes to someone else’s resolver, however, is not. Keep DNS Checkers educational and your production changes deliberate.

Frequently asked questions

Quick answers about propagation, resolvers, and how this checker works.

Can a website flush my DNS? +

No. Flushing DNS requires local OS privileges. DNS Checkers only provides commands for you to run yourself.

When should I flush DNS? +

After changing DNS records, switching VPN, or when a site resolves to an outdated IP on your machine.

Is flushing DNS unsafe? +

It is a standard troubleshooting step. It does not delete files; it clears cached hostname lookups.

Do I also need to flush the browser? +

Sometimes. Browsers may cache DNS or HSTS independently of the OS resolver.

What about router caches? +

Some routers cache DNS. Rebooting the router or changing its DNS settings can help after major DNS migrations.

DNS Checkers uses essential cookies to run. Optional advertising cookies (Google AdSense) load only if you accept. See the Cookie Policy and Privacy Policy.