If you are seeing “Site Not Found” or 404 Errors on websites you know are active, your computer’s DNS cache might be outdated. This cache stores the IP addresses of web servers you’ve recently visited. When a website moves to a new server, your computer may still try to use the old, “stale” address.
Flushing your DNS forces your system to ask nameservers for the most current information, resolving connectivity issues instantly.
How to Clear DNS Cache on Windows
Regardless of your Windows version, the process primarily uses the Command Prompt.
Windows 11 and Windows 10
- Press the Windows Key + S and type
Command Prompt. - Right-click the app and select Run as Administrator.
- In the black window, type the following command and press Enter:
ipconfig /flushdns - Success Message: “Windows IP configuration successfully flushed the DNS Resolver Cache.”
Windows 8 / 8.1
- Press Windows Key + X to open the Quick Access menu.
- Select Command Prompt (Admin).
- Type
ipconfig /flushdnsand press Enter.
Legacy Windows (7, Vista, XP)
- Windows 7/Vista: Click Start, type
cmdin the search box, right-click it, and select Run as Administrator. - Windows XP: Click Start > Run, type
cmd, and press Enter. - Command: Type
ipconfig /flushdnsand press Enter.
How to Clear DNS Cache on macOS
On a Mac, you use the Terminal app to reset your DNS. Note that you will need your administrator password to complete this.
macOS Monterey, Ventura, Sonoma, and Sequoia (Modern Versions)
- Open Finder, go to Applications > Utilities, and double-click Terminal.
- Copy and paste the following command:
sudo killall -HUP mDNSResponder - Press Enter. You will be prompted for your Admin Password (bullets won’t show as you type).
- Press Enter again.
Older macOS Versions
| Version | Command |
| OS X 10.10.4+ | sudo killall -HUP mDNSResponder |
| OS X 10.10.1–10.10.3 | sudo discoveryutil mdnsflushcache |
| OS X 10.7 – 10.9 | sudo killall -HUP mDNSResponder |
| OS X 10.5 – 10.6 | sudo dscacheutil -flushcache |
Why Should You Flush Your DNS?
- Fix 404 Errors: Connect to websites that have recently changed their hosting or IP address.
- Security: Clear out “DNS Spoofing” or “Cache Poisoning” attempts where hackers try to redirect your traffic to fraudulent sites.
- Privacy: Erase the local record of the web addresses you have visited.
Pro Tip: If flushing your DNS doesn’t fix the issue, try clearing your browser’s cookies and cache as a secondary step.