Skip to content

Tutorials DNS Beginner1 min read

How to Flush DNS Cache on Windows, macOS, Linux and Chrome

Clear your DNS cache on Windows, macOS, Linux and in Chrome so your device fetches fresh DNS records after a website moves or DNS changes.

By ZSOLNET Editorial Team Updated

Key takeaways

  • Your device keeps recent DNS answers to save time; after a change they can be stale.
  • Flushing removes cached answers so the next lookup is fresh.
  • Browsers and routers keep their own caches too.

Operating systems and browsers remember DNS answers for as long as each record’s TTL allows. That’s usually helpful — until you’ve just moved a website and your computer keeps going to the old server.

Windows

Open Command Prompt as administrator and run:

ipconfig /flushdns

You’ll see Successfully flushed the DNS Resolver Cache.

macOS

Open Terminal and run:

sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder

Enter your password when asked. There’s no confirmation message.

Linux

Most current distributions use systemd-resolved:

sudo resolvectl flush-caches

If you use nscd or dnsmasq, restart that service instead.

Chrome and Edge

Browsers based on Chromium keep their own cache. Visit chrome://net-internals/#dns (or edge://net-internals/#dns) and click Clear host cache. Then go to the Sockets section and click Flush socket pools.

Firefox

Visit about:networking#dns and click Clear DNS Cache.

Phones and routers

  • Android and iPhone: turning airplane mode on and off clears the cache.
  • Routers: restarting the router clears its cache.

Frequently asked questions

Is flushing the DNS cache safe?

Yes. It only removes temporary lookups. The next visit to each site takes a few milliseconds longer while the answer is fetched again.

I flushed my cache but still see the old site.

Your ISP's resolver may still hold the old answer until its TTL expires. Try a public resolver like 1.1.1.1, or check progress with the DNS propagation tool.

Share X LinkedIn Facebook

Log in to your account

Manage your domains, hosting and invoices in one place.

Secure connection straight to the ZSOLNET client area.

No account yet?