To clear the DNS cache in Chrome, type chrome://net-internals/#dns in the address bar and click Clear host cache. The whole process takes under ten seconds and does not require restarting the browser.
Chrome stores DNS responses in an internal cache so it doesn't have to query name servers every time you visit a site. That speeds up browsing, but it can cause problems when a domain changes its IP address — for example, after a hosting migration — or when errors like ERR_NAME_NOT_RESOLVED or DNS_PROBE_FINISHED_NXDOMAIN appear.
When Do You Need to Clear Chrome's DNS Cache?
This isn't something you need to do routinely, but there are specific situations where it makes a real difference:
- Hosting migration: the domain points to the new IP in DNS, but Chrome keeps loading the old server because it cached the previous address.
- Persistent connection errors: you see
ERR_NAME_NOT_RESOLVEDorDNS_PROBE_FINISHED_NXDOMAINeven though the site works in another browser or device. - Changes to the hosts file: you edited
/etc/hosts(Linux/Mac) orC:\Windows\System32\drivers\etc\hosts(Windows) and Chrome isn't reflecting the change. - Redirect loops: some misconfigured redirects get stuck in the DNS cache.
- Local development: you're working with local or staging domains that change frequently.
How to Clear Chrome's DNS Cache (Main Method)
This method works the same on Windows, macOS, and Linux:
- Open Chrome.
- In the address bar, type exactly:
chrome://net-internals/#dns - Press Enter.
- Click the Clear host cache button.
- No confirmation message appears — the flush is immediate.
After clearing, try accessing the problematic site again. If the error persists, the operating system's DNS cache may also be storing the wrong address (see the next section).
Verifying the Cache Was Cleared
On the same chrome://net-internals/#dns screen, you'll see a table of stored DNS entries. If the table appears empty after clicking Clear host cache, the flush completed successfully.
Also Clear Chrome's Socket Cache
Sometimes the issue isn't the DNS cache but open connections (sockets). Flush both at the same time to rule out either cause:
- Go to
chrome://net-internals/#sockets - Click Flush socket pools.
You can then switch back to the DNS tab and clear that cache in the same session.
Clear the Operating System DNS Cache (When Chrome Isn't Enough)
Chrome maintains its own internal cache, separate from the operating system's. If you've cleared Chrome's DNS cache and the error persists, the next step is to flush the system cache:
Windows
- Open Command Prompt as administrator (search "cmd" → right-click → Run as administrator).
- Type:
ipconfig /flushdns - Press Enter. You should see: Successfully flushed the DNS Resolver Cache.
macOS
- Open Terminal.
- Run the appropriate command for your macOS version:
- macOS Ventura / Monterey / Big Sur:
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder - macOS Catalina / Mojave:
sudo killall -HUP mDNSResponder
- macOS Ventura / Monterey / Big Sur:
- Enter your password when prompted.
Linux (Ubuntu / Debian)
- Open a terminal.
- If using systemd-resolved:
sudo systemd-resolve --flush-caches - If using nscd:
sudo service nscd restart
| Operating System | Command to Flush DNS Cache |
|---|---|
| Windows 10 / 11 | ipconfig /flushdns |
| macOS Ventura+ | sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder |
| Ubuntu (systemd) | sudo systemd-resolve --flush-caches |
To understand how DNS affects your site's overall load time, explore our web performance guides covering TTFB, browser caching, and CDN configuration.
Key Takeaways
- The fastest path in Chrome is
chrome://net-internals/#dns→ Clear host cache. - Use it after hosting migrations, hosts file changes, or persistent DNS resolution errors.
- If the error remains, also flush sockets (
chrome://net-internals/#sockets) and the OS-level DNS cache. - Chrome and the operating system maintain independent DNS caches — you may need to clear both.
- The process doesn't require restarting Chrome or your computer.
If DNS errors keep coming back or your site is slow to propagate after a migration, the team at elenlace.com can review your DNS and hosting configuration to get things sorted quickly.
FAQ
Will clearing the DNS cache delete my history or saved passwords?
No. The DNS cache only stores the mapping between domain names and IP addresses. It contains no browsing history, cookies, passwords, or form data. You can flush it without any risk to your personal information.
How often should I clear Chrome's DNS cache?
There's no recommended interval for normal use. Chrome automatically manages the time-to-live (TTL) of each record. Only intervene when you encounter connection errors on specific sites or when you know a domain just changed servers.
Why does a site load fine on my phone but not in Chrome on my computer?
Your phone (on mobile data or a different network) likely uses different DNS servers with fresher records. Your desktop has the old IP address cached. Flushing Chrome's DNS cache on your computer should resolve the discrepancy.
Does chrome://net-internals/#dns work on all operating systems?
Yes, this Chrome internal URL works the same on Windows, macOS, and Linux. It operates inside the browser itself, independent of the OS. The interface may look slightly different across Chrome versions, but the Clear host cache button has been there for years.
Prefer it done for you? El Enlace handles hosting and professional web development.
Compare providers
Other providers and guides worth comparing: