Performance & Maintenance

How to Clear DNS Cache in Chrome and Other Browsers

Learn how to clear DNS cache in Chrome, Firefox, Safari, and Edge to fix loading errors and see updated websites correctly.

Top view of financial analysis tools on a desk including a laptop, smartphone, and graphs.

To clear the DNS cache in Chrome, open a new tab and type chrome://net-internals/#dns, then click Clear host cache. This fixes errors where sites fail to load after a hosting or DNS change.

If you're seeing an outdated version of a website, getting "Site not found" errors, or experiencing issues after a hosting migration, clearing the DNS cache is the first troubleshooting step.

What Is DNS Cache and Why Does It Cause Problems?

DNS (Domain Name System) translates a domain name like example.com into an IP address that servers understand. To avoid looking this up every time, your browser and operating system store a local copy: the DNS cache.

This is efficient most of the time, but it causes problems when:

  • A website migrated to a new server with a different IP.
  • The domain's DNS records were updated.
  • The cache stored an incorrect IP or a temporary error result.
  • You're testing a development site and need to see the updated version.

The solution is to clear that cache so the browser or operating system re-queries DNS and gets the latest information.

How to Clear DNS Cache in Chrome

Chrome maintains its own internal DNS cache, separate from the operating system. To flush it:

  1. Open Chrome and type in the address bar: chrome://net-internals/#dns
  2. Click the Clear host cache button.
  3. Then go to the Sockets tab in the same panel and click Flush socket pools to close old connections.
  4. Reload the problem page with Ctrl + Shift + R (force reload, bypasses browser cache).

This clears DNS entries stored only within Chrome. If the problem persists, you also need to flush the operating system cache (see the next section).

How to Clear DNS Cache in Firefox, Edge, and Safari

Mozilla Firefox

  1. Type about:config in the address bar and accept the warning.
  2. Search for the preference network.dnsCacheExpiration.
  3. Temporarily change its value to 0, then restore it to 60. This instantly flushes the cache.

Faster alternative: go to Settings → Privacy & Security → Clear Data and uncheck everything except Cached Web Content.

Microsoft Edge

  1. Type edge://net-internals/#dns in the address bar.
  2. Click Clear host cache.
  3. Also go to the Sockets tab and click Flush socket pools.

Apple Safari (macOS)

Safari doesn't have a direct option to clear only the DNS cache. The most effective method is to flush the macOS system DNS cache (see the next section) and then restart Safari.

Browser URL / Path Action
Chrome chrome://net-internals/#dns Clear host cache
Edge edge://net-internals/#dns Clear host cache
Firefox about:config → network.dnsCacheExpiration Set to 0 and restore
Safari N/A Flush OS DNS + restart

How to Flush DNS on the Operating System

The operating system also maintains its own DNS cache, shared across all browsers and applications. Flushing it resolves issues that persist even after clearing the browser DNS cache.

Windows 10 / 11

  1. Open Command Prompt or PowerShell as Administrator.
  2. Run: ipconfig /flushdns
  3. You'll see the message: Successfully flushed the DNS Resolver Cache.

macOS (Ventura / Sonoma and recent versions)

  1. Open Terminal.
  2. Run: sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
  3. Enter your administrator password when prompted.

Linux (systemd-resolved)

  1. Open a terminal.
  2. Run: sudo systemd-resolve --flush-caches
  3. Verify with: systemd-resolve --statistics (the cache count should be at zero or very low).

If your site still doesn't load correctly after flushing DNS, the issue may be with DNS propagation or server configuration. The team at elenlace.com can diagnose and resolve these infrastructure problems for you.

When to Clear DNS Cache (Real Use Cases)

You don't always need to clear the DNS cache. Do it when:

  • You migrated your site to another host and some users (or you) still see the old site.
  • You changed DNS records (A, CNAME, MX) and the changes aren't reflected.
  • You're getting DNS errors like "ERR_NAME_NOT_RESOLVED" or "DNS_PROBE_FINISHED_NXDOMAIN" in Chrome.
  • You're developing locally with hosts file entries and the browser is still caching the old address.
  • A third-party site changed its URL or IP and your browser still has the old one cached.

Find more technical guides on server setup, DNS, and web optimization in the performance category of our blog.

DNS Cache vs. Browser Cache: What's the Difference?

It's easy to confuse these two, but they're different things:

  • DNS cache: stores the association between a domain name and its IP address. It does not store page content.
  • Browser cache: stores page resources (HTML, CSS, JS, images) to avoid re-downloading them.

If the site loads but shows outdated content (old logo, wrong colors), the problem is usually the browser cache, not DNS. In that case, use Ctrl + Shift + R in Chrome for a hard reload.

Key Takeaways

  • In Chrome, go to chrome://net-internals/#dns and click Clear host cache.
  • In Edge, use edge://net-internals/#dns; in Firefox, set network.dnsCacheExpiration to 0 and restore it.
  • The OS also has its own DNS cache: on Windows use ipconfig /flushdns; on Mac, sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder.
  • Clear both the browser DNS cache AND the OS cache to fully resolve issues after hosting migrations or DNS changes.
  • DNS cache (domain-to-IP) is different from browser cache (page resources): they're separate problems with separate solutions.

Experiencing persistent DNS or site migration issues? Reach out to elenlace.com and our specialists will diagnose and resolve the problem quickly.

FAQ

Can clearing the DNS cache cause any problems?

No. Clearing the DNS cache is completely safe. The only effect is that the next query to that domain will take a brief moment longer than usual while it resolves again, but this is imperceptible to the user.

How often should I clear the DNS cache?

There's no need to do it routinely. Only clear the DNS cache when you experience a specific problem: a site that won't load, DNS errors, or when you need to see recent DNS record changes before the TTL expires.

Why does Chrome show an old site even after clearing the DNS cache?

Because the DNS cache and the browser resource cache are independent. After clearing the DNS cache at chrome://net-internals/#dns, also do a hard reload with Ctrl + Shift + R to bypass the page's cached resources.

How long does DNS take to update after a change?

It depends on the TTL set in the DNS records. With a TTL of 3600 s (1 hour), it can take up to 24-48 hours to propagate globally. If you reduce the TTL to 300 s (5 minutes) before the change, the update reaches users in minutes.

Useful resources

Other providers and guides worth comparing:

← All