Every time you visit a website, your device looks up its address and keeps a copy for a while so the next visit is faster. That saved list is the DNS cache. When a website moves to a new server, or a saved entry goes bad, the old copy can stop the site loading on your device while it works everywhere else. Flushing the DNS cache throws the saved copies away so fresh ones are looked up.
It is worth trying when:
It will not fix a connection that is down altogether. If no website loads on any device, see router connected but no internet. If one device says it is connected but has no internet, start with Wi-Fi connected but no internet.
ipconfig /flushdns
If you get an access error instead, right-click Command Prompt in the Start menu, choose Run as administrator, and run the command again. The same command works in PowerShell and Windows Terminal.
To see what was cached before you flush it, run ipconfig /displaydns.
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
There is no confirmation message - if no error appears, the cache has been cleared. This works on current macOS versions.
Chrome keeps its own small DNS cache, separate from the system's. If one site still fails in Chrome after flushing the system cache:
chrome://net-internals/#dns in the address bar and press Enter.In Microsoft Edge the address is edge://net-internals/#dns. Close and reopen the tab afterwards.
Android has no flush command, but any of these clears the DNS cache:
chrome://net-internals/#dns and tap Clear host cache.If sites still fail on every network, check Private DNS: on Pixel and most phones it is under Settings > Network & internet > Private DNS (Samsung: Settings > Connections > More connection settings > Private DNS). Set it to Automatic to rule it out.
iOS also has no command for this. Turn Airplane mode on and off from Control Centre, or restart the device. If a VPN or DNS app is installed, turn it off and test again, because those apps provide their own DNS.
If flushing the cache did not help, the DNS server itself may be the problem: switch to a public DNS server or follow DNS server not responding: how to fix it. Restarting the router also clears the DNS cache it keeps for the whole network.
It deletes the list of website addresses your device has remembered, so the next visit looks each address up again. That fixes problems caused by an old or wrong saved address.
Yes. Nothing is deleted except the saved lookups, which are rebuilt automatically. The first visit to each site may take a fraction of a second longer.
Usually not, but if Windows shows an access error, open Command Prompt as administrator and run the command again.
Phones have no flush command. Turning Airplane mode on and off, or restarting the phone, clears the DNS cache. Chrome on Android also has its own cache you can clear at chrome://net-internals/#dns.
Comments