How to flush your DNS cache
Flushing the DNS cache makes your device forget the website addresses it has remembered, so it looks them up fresh. It fixes sites that recently moved and still show the old version, “DNS_PROBE_FINISHED_NXDOMAIN” and “server not found” errors, and changes that haven’t kicked in after you changed your DNS server. It’s safe: nothing is deleted except temporary lookups. Pick your device below.
Windows 11 and Windows 10
- Press Start, type cmd and open Command Prompt.
- Type
ipconfig /flushdnsand press Enter. - You should see “Successfully flushed the DNS Resolver Cache.”
If a site still misbehaves, run ipconfig /release then ipconfig /renew to get a fresh connection, or restart the PC. PowerShell users can run Clear-DnsClientCache.
Mac (macOS Sonoma, Sequoia and earlier)
- Open Terminal (Applications → Utilities).
- Paste
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponderand press Enter. - Type your Mac password (nothing shows while you type) and press Enter. There’s no message when it works.
Google Chrome, Edge and Brave (the browser has its own cache)
- Type
chrome://net-internals/#dnsin the address bar (Edge:edge://net-internals/#dns, Brave:brave://net-internals/#dns). - Click Clear host cache.
- Go to
chrome://net-internals/#socketsand click Flush socket pools, then reload the site.
This works in Chrome on Android too.
Firefox
Type about:networking#dns in the address bar and click Clear DNS Cache. Then reload the page.
Android
Android has no flush button. The quickest fix is to turn Aeroplane mode on for 10 seconds, then off, which clears the phone’s lookups. Restarting the phone does the same. If you use Chrome, also clear its cache as above. If you set a custom “Private DNS” (Settings → Network & internet → Private DNS), try switching it to Automatic to rule it out.
iPhone and iPad
Turn Aeroplane mode on, wait 10 seconds, turn it off, or restart the device. As a last resort, Settings → General → Transfer or Reset iPhone → Reset → Reset Network Settings clears all network caches, but it also forgets your saved Wi‑Fi passwords.
Linux
Most modern distributions (Ubuntu, Fedora, Debian with systemd-resolved) use resolvectl flush-caches (older versions: sudo systemd-resolve --flush-caches). If you use nscd, run sudo nscd -i hosts.
Your router (and smart TVs, consoles)
Routers often cache lookups for the whole house. Unplug the router for 30 seconds and plug it back in. Smart TVs, PlayStation and Xbox have no flush option either: restart them fully (not standby). If one device works and another doesn’t, the problem is that device’s cache.
Still showing the old site?
Then the old copy is probably further away, at your ISP’s DNS server or the website’s own DNS. Use the DNS propagation checker to see whether Google, Cloudflare and other big resolvers have the new address yet, and how long old copies will last. Test on mobile data to rule out your home network, and see the DNS lookup for the full records.
Frequently asked questions
Is it safe to flush the DNS cache?
Yes. It only clears temporary records of website addresses. Your device rebuilds them automatically as you browse, so the first visit to each site may take a few milliseconds longer.
How do I flush DNS on Windows 11?
Open Command Prompt, type ipconfig /flushdns and press Enter. You will see “Successfully flushed the DNS Resolver Cache.”
Does restarting a computer clear the DNS cache?
Yes. A full restart clears the operating system’s DNS cache. On Windows, use Restart rather than Shut down, because Fast Startup can keep some state.
Why does a website work on my phone but not my laptop?
Each device keeps its own DNS cache. Flush the laptop’s cache and its browser’s cache. If it still fails, check whether the laptop uses a different DNS server or a VPN.
More guides
- What is IPv6?
- How to find your IP address (every device)
- Public vs private IP address
- What is CGNAT (carrier-grade NAT)?
- How to hide your IP address
- How to find your PS5 IP address
- How to find your Xbox IP address
- How to find your smart TV’s IP address
- How to find your router’s IP address
- What is a good internet speed?
- Why is my internet slow at night?
- How to change DNS on Windows 11 and 10
- How to change DNS on a Mac
- How to change DNS on your router
- Public DNS servers compared
- Why port forwarding isn’t working
- Keeping your internet on during load-shedding
- Fibre vs LTE vs 5G in South Africa
- How to check if a port is open
- How to create a strong password
- What is a user agent?
- How to find your MAC address
- What is a good ping?
- Subnet mask cheat sheet (CIDR table)
- How to find who owns an IP address
- How to find who owns a domain
- How to check if an IP address is a VPN
- What is an ASN (autonomous system number)?
- What is an IP address?