Flushing DNS clears cached domain lookups so your PC fetches fresh IPs. Useful when a server hostname won’t resolve or after network/VPN changes.
Windows
- Open Command Prompt or Terminal as Administrator.
- Run:
ipconfig /flushdns - You should see:
Successfully flushed the DNS Resolver Cache.
Optional full reset (then reboot):
ipconfig /flushdns
ipconfig /registerdns
ipconfig /release
ipconfig /renew
netsh winsock reset
macOS
- Open Terminal.
- Run:
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder - Enter your password. No success message is normal.
Linux
Depends on your stack - try one of:
sudo resolvectl flush-caches
sudo systemd-resolve --flush-caches
sudo systemctl restart systemd-resolved
sudo systemctl restart NetworkManager
Also worth doing
- Router: power cycle 30 seconds.
- Browser DNS (Chrome/Edge): open
chrome://net-internals/#dnsoredge://net-internals/#dns→ Clear host cache. - Stuck resolving? Switch to Cloudflare (
1.1.1.1/1.0.0.1) or Google (8.8.8.8/8.8.4.4) DNS, then flush again.
Related: Connection Reset · GetSockOpt · Authentication