All web browsers create a DNS cache to store information about visited websites for faster loading in the future. However, when the DNS cache gets dumped or corrupted, it might cause connection issues. To fix the problems caused by the DNS cache, we must flush it. Today, we will check out different methods to clear the DNS cache in Chrome, Edge, Firefox, Opera, and Safari web browsers.
In most cases, clearing the browser cache and data and flushing the DNS cache on Windows resolves browser issues. However, sometimes we only need to clear the DNS cache in Chrome to get rid of such issues.
Below, we’ll see how to clear the DNS cache in major web browsers like Chrome, Edge, Firefox, Opera, and Safari.
Clear DNS Cache in Chrome
While you can easily clear browsing data and cache from Google Chrome’s Settings page, there’s no way to do the same when it comes to clearing the DNS cache. You need to use a command in the URL bar to access the option to clear the DNS host cache. Let’s see how to do it.
- In the Chrome address bar, type
chrome://net-internals/#dns
and press Enter. This will take you to the DNS page on the Net Internals site. - Click the Clear host cache button.
- Close all tabs in Chrome and restart the browser. This will force all DNS lookups to be performed afresh, which may take a few seconds longer than usual but will clear any cached DNS entries.
Clear Host Cache in Edge
Microsoft switched to the Chromium open-source web browser project for Edge back in 2020. Thus, both browsers share their settings, extensions, flags, etc. This means that the method to clear the DNS cache in Edge is the same as in Chrome.
Clearing your DNS cache can help resolve these issues and is a relatively easy process. Here’s how to clear the DNS cache in Edge:
- Open the Edge browser and type
edge://net-internals/#dns
into the address bar. - On the Network Internals tool page, click the Clear host cache button.
- Doing so will clear the DNS cache in Edge.
- Close the Network Internals tool page and restart Edge for the changes to take effect.
Clear Host Cache in Opera
Just like Google Chrome and Edge, Opera is a Chromium-based web browser. You can clear the DNS cache in the Opera browser the same way. Here’s how to do it:
- Open Opera, type or paste
opera://net-internals/#dns
into the address bar, and press Enter. - It’ll open the DNS options page.
- Click the Clear host cache button next to the Host resolver cache.
- That’s it! Now, restart the browser.
Clear DNS Cache in Firefox
The method to clear the DNS cache in Mozilla Firefox differs from the Chromium-based browsers mentioned above. However, it’s a relatively simple process that can help resolve browsing issues and enhance internet connectivity. Here’s how to flush the DNS cache in Firefox:
- Type
about:networking#dns
in the address bar of the Firefox browser. Press the Enter key. - Click the Clear DNS Cache button.
- The DNS cache will be flushed instantly.
There’s yet another way to flush the DNS cache in Firefox.
- Type
about:config
into the Firefox address bar and press Enter. - Search for “network.dnsCacheExpiration“.
- Click the Edit button and change the DNS expiration value from ‘60‘ to ‘0‘. Save the changes.
- Close the
about:config
tab and restart Firefox for the changes to take effect.
Your DNS cache should now be cleared.
Clear Cache in Safari
The option to clear the DNS cache in Safari remains hidden in Safari by default. It’s pretty much like Android’s hidden Developer options. You must enable Safari’s Develop menu to access the Empty Caches option. Let’s see how to do it.
- Launch Safari on your Mac.
- Go to the Safari menu bar at the top of the screen and click on Safari > Preferences.
- In the Safari settings or preferences window, click on the Advanced tab.
- Now, click on the check box next to the Show Develop menu in menu bar option to enable the Develop menu.
- Close the Advanced Preferences window.
- You’ll have a new item in the Safari menu bar called “Develop“.
- Click it and select the Empty Caches option from the drop-down menu.
You may also need to force quit Safari using the Command + Option + Esc keyboard shortcut and then relaunch it for the changes to take effect.
While clearing the DNS cache won’t necessarily speed up browsing significantly, it can help resolve certain issues caused by incorrect or outdated data stored in the system. Next time you run into an issue with your browser, consider clearing its DNS cache before doing anything else.
Read Next: 73 Google Search Tricks, Hacks, and Easter Eggs