Domains

How to Flush Your DNS Cache (Windows, Mac, Linux, Chrome, iPhone & Android)

Website still showing the old version after a DNS change? Clear your DNS cache in seconds with these commands for Windows, macOS, Linux, Chrome, Edge, Firefox, iPhone and Android.

3 min read EDZNET Team

You have changed a DNS record, everyone else can see the new website — but your own computer stubbornly shows the old one. Nine times out of ten, the culprit is your local DNS cache: your device, browser or router remembered the old answer and has not asked again yet.

Flushing the cache forces a fresh lookup. It takes seconds and is completely safe — the worst that happens is the next page loads a fraction slower while the cache rebuilds.

First, confirm the change has actually propagated beyond your machine with our DNS propagation checker. If the providers there show the new value, the problem really is local and the steps below will fix it.

Windows 10 and 11

  1. Open the Start menu, type cmd, right-click Command Prompt and choose Run as administrator.
  2. Run:
ipconfig /flushdns

You should see “Successfully flushed the DNS Resolver Cache.” PowerShell users can use Clear-DnsClientCache instead.

macOS

Open Terminal (Applications → Utilities) and run:

sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder

Enter your Mac password when asked. There is no confirmation message — silence means it worked.

Linux

Most modern distributions use systemd-resolved:

resolvectl flush-caches

On older systems the command is sudo systemd-resolve --flush-caches. If you run nscd or dnsmasq, restart that service instead.

Google Chrome

Chrome keeps its own DNS cache separate from your operating system.

  1. Go to chrome://net-internals/#dns and click Clear host cache.
  2. Then go to chrome://net-internals/#sockets and click Flush socket pools.

Microsoft Edge

Edge is built on the same engine as Chrome: visit edge://net-internals/#dns, click Clear host cache, then flush socket pools at edge://net-internals/#sockets.

Firefox

Visit about:networking#dns and click Clear DNS Cache. If Firefox is using DNS over HTTPS, that cache is cleared too.

Safari

Safari uses the macOS system cache, so the Terminal command above clears it. Quit and reopen Safari afterwards.

iPhone and iPad

There is no button for it, but either of these works:

  • Turn Airplane Mode on for about 10 seconds, then off again.
  • Or restart the device.

Android

  • Toggle Airplane mode on and off, or restart the phone.
  • In Chrome for Android you can also visit chrome://net-internals/#dns and tap Clear host cache.

Your Router

Many home and office routers cache DNS for every device on the network. Turning the router off for 30 seconds and back on clears it. If one office machine sees the change and another does not, the router is a likely suspect.

Still Seeing the Old Site?

  1. Check propagation with the DNS checker. If your nameservers still return the old value, the record has not been changed where you think it has — or you are editing DNS at the wrong provider.
  2. Try mobile data. Switching off Wi-Fi uses a completely different network and DNS resolver — a quick way to rule out your router and ISP.
  3. Check your hosts file. A manual entry in C:\Windows\System32\drivers\etc\hosts (Windows) or /etc/hosts (Mac/Linux) overrides DNS entirely.
  4. Clear your browser cache too. DNS may be fine but the browser is showing a cached copy of the old page. A hard refresh (Ctrl+F5 or Cmd+Shift+R) helps.
  5. Wait out your ISP. Your provider’s resolver follows the old record’s TTL — see what TTL is and why it decides how long changes take.

Frequently Asked Questions

Is it safe to flush my DNS cache?

Yes. It only removes temporary lookups. Your device simply asks again the next time you visit a site.

Will flushing my cache make the change appear for everyone?

No — it only affects your own device. Other people’s networks follow their own caches. Read how DNS propagation works for the full picture.

How often should I flush DNS?

Only when you need to — typically right after a DNS change, or when a site behaves oddly on one device but fine elsewhere.

Check DNS propagation DNS propagation explained

Relevant solutions

Questions about your setup?

Talk to the people who run the servers. We'll tell you honestly what you need — and what you don't.