How to clear your DNS cache (Windows, Mac, browsers, phones)

Clear cached DNS answers on your own devices so you see a recent DNS change sooner, with commands for Windows, macOS, Chrome and mobile.

Guide2 min readLast updated
On this page
  1. Windows
  2. macOS
  3. Linux (systemd)
  4. Chrome and Edge
  5. Firefox
  6. Phones and tablets
  7. Still seeing the old answer?
  8. Common questions

Your computer, browser and router each keep recently looked-up DNS answers. Clearing them helps your devices pick up a change sooner. It doesn’t affect anyone else.

Windows

Open Command Prompt and run:

ipconfig /flushdns

macOS

Open Terminal and run:

sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder

Enter your Mac password when asked; nothing appears as you type.

Linux (systemd)

resolvectl flush-caches

Chrome and Edge

Browsers keep their own cache. Visit chrome://net-internals/#dns (or edge://net-internals/#dns) and clear the host cache, then close all browser windows and reopen.

Firefox

Close and reopen Firefox completely.

Phones and tablets

Switch airplane mode on for ten seconds, then off. Switching between Wi-Fi and mobile data also uses a different resolver, which is a quick way to test a change.

Still seeing the old answer?

Your router or ISP’s resolver may still have it cached. Wait for the record’s TTL to pass, or check the authoritative answer directly to confirm the change is correct. How to check DNS records (dig, nslookup and online tools)

Prefer to follow along?

Common questions

How do I clear my DNS cache?

On Windows run ipconfig /flushdns; on macOS use the dscacheutil -flushcache command. Also restart the browser, which keeps a cache of its own. This only affects your computer — it does not speed up propagation for anyone else.

Spotted something out of date or unclear? Tell us and we’ll fix it.

Keep going