How to Clear the DNS Cache in Mozilla Firefox

Why Firefox Needs Its Own DNS Flush

The Domain Name System (DNS) is often described as the phonebook of the internet. When you type www.digitash.com into your address bar, a DNS server translates that human-readable domain name into the numerical IP address where the website’s server actually lives. To speed up your browsing experience, your computer stores these IP addresses in a local “DNS cache.” The next time you visit the site, your computer already knows where to go.

However, if a website recently migrated to a new server and changed its IP address, your local cache will point to the old, dead location, resulting in an endless loading screen or an error page. The standard advice is to flush your operating system’s DNS cache using the Windows Command Prompt or the macOS Terminal.

But there is a catch: Mozilla Firefox maintains its own, entirely separate DNS cache, independent of the operating system.

If you flush your Windows DNS cache but Firefox is still loading a broken page, it is because Firefox is relying on its internal cache. You must clear the Firefox cache directly.

How to Clear the Firefox DNS Cache

Unlike Google Chrome, which has a hidden net-internals page specifically for this purpose, Firefox manages its DNS cache through its standard settings menu.

  1. Open the Mozilla Firefox browser.
  2. Click the hamburger menu (three horizontal lines) in the top-right corner of the window.
  3. From the dropdown menu, select Settings (on Mac, this might be labeled Preferences).
  4. In the left-hand sidebar of the Settings page, click on Privacy & Security.
  5. Scroll down the page until you find the section labeled Cookies and Site Data.
  6. Click the button labeled Clear Data….
  7. A small pop-up window will appear. Here, you will see two checkboxes:
    • Cookies and Site Data: This contains your active logins and shopping carts. You can uncheck this box if you do not want to be logged out of your websites.
    • Cached Web Content: This contains the DNS cache, along with saved images and scripts. Ensure this box is checked.
  8. Click the Clear button.

Firefox will immediately dump its internal cache of IP addresses. The next time you try to load the problematic website, Firefox will be forced to reach out to a fresh DNS server, acquire the correct new IP address, and load the site properly.

Advanced Troubleshooting: Disabling DNS over HTTPS (DoH)

If clearing the Cached Web Content does not fix the issue, the problem might be related to a relatively new privacy feature in Firefox called DNS over HTTPS (DoH).

DoH encrypts your DNS requests to prevent your internet service provider from seeing which websites you visit. By default, Firefox routes these requests through Cloudflare or NextDNS. If the Cloudflare DNS server is experiencing an outage, or if your network administrator has blocked it, Firefox will fail to load pages even if your standard internet connection is perfectly fine.

To temporarily disable this feature and force Firefox to use your local network’s standard DNS resolver:

  1. Go back to Settings > Privacy & Security.
  2. Scroll all the way down to the very bottom of the page to the section labeled DNS over HTTPS.
  3. You will see several options (Default, Increased Protection, Max Protection, Off).
  4. Select Off.

Try loading the website again. If it works, you have confirmed that the DoH provider was the issue. You can either leave it off (sacrificing a bit of privacy) or switch the provider from Cloudflare to NextDNS in the “Increased Protection” menu to see if that resolves the conflict.

Leave a Reply

Your email address will not be published. Required fields are marked *

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.

Receive our best articles and tips delivered straight to your inbox.