Your computer and browser remember recent DNS answers so sites load faster. When a site moves to a new server, or a lookup failed once, that memory can send you to the wrong place or show errors. Flushing the DNS cache makes your device ask again.
When to flush DNS
- A site shows "server not found" or
DNS_PROBE_FINISHED_NXDOMAINbut works on other devices. - You changed a DNS record and want to see the new value.
- A site loads an old version after a migration.
- After removing malware that changed your DNS settings.
Windows 10 and 11
- Open the Start menu, type
cmd, right-click Command Prompt and choose Run as administrator. - Run:
ipconfig /flushdns
You should see "Successfully flushed the DNS Resolver Cache."
macOS
Open Terminal and run (enter your password when asked):
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
There is no confirmation message. This command works on current macOS versions.
Linux
Most current distributions use systemd-resolved:
sudo resolvectl flush-caches
On older systems the command is sudo systemd-resolve --flush-caches. If you use another resolver such as dnsmasq or nscd, restart that service instead.
Chrome, Edge and Brave
Browsers keep their own cache.
- Open
chrome://net-internals/#dns(in Edge:edge://net-internals/#dns). - Click Clear host cache.
- Then open
chrome://net-internals/#socketsand click Flush socket pools.
Firefox
Open about:networking#dns and click Clear DNS Cache.
iPhone and Android
Phones have no flush command. Turn Airplane mode on for a few seconds and off again, or restart the phone.
Still seeing the old address?
Your device asks a resolver, which also caches answers until the record's TTL runs out. Check what public DNS returns with our DNS Lookup, or compare 13 resolvers at once with the DNS Propagation Checker. If it shows the new value and your device does not, flush again or switch to a public DNS server.
Frequently asked questions
Is it safe to flush the DNS cache?
Yes. Your device simply looks names up again. The first visit to each site may be a few milliseconds slower.
How often should I flush DNS?
Only when you have a problem. There is no benefit in doing it regularly.
Does flushing DNS change my IP address?
No. To change your IP, see how to change your IP address.