Help Docs Liquid Web Portal Domains and DNS DNS Management Fixing Firefox Bypassing Hosts File

Fixing Firefox Bypassing Hosts File

Editing the Hosts File for site testing is common. Yet, recent Firefox updates may render it less effective, causing confusion during testing.

Editing your Hosts File is a common way to test your new or newly migrated website before changing your DNS entries and sharing that site with the whole world. For more information on changing your hosts file, see Editing Your DNS Hosts File. However, a recent “upgrade” to Firefox may make editing your hosts file ineffective, causing confusion while trying to test your new site.

Firefox now uses DNS over HTTPS (or DOH) by default. That means instead of checking your local hosts file or even your DNS resolver, Firefox simply makes the DNS request over HTTPS from within the browser. This behavior guarantees that the website displayed is pointing to the IP address that the internet sees as authoritative for that domain. While generally a good idea, this makes going to a different IP to test a new site impossible.

There are two primary ways to avoid this behavior while testing your new site. First, simply use a different browser. Chrome, Edge, Safari, and many others do not have this setting enabled by default and will continue to work as expected with a modified hosts file. The second method is to disable DOH in your Firefox browser. Follow the directions below to disable this setting.

  1. Open your Firefox browser.
  2. Go to the Settings menu (click on the three lines at the end of the toolbar).
  3. Click Privacy and Security.
  4. Scroll down to the settings for Enable DNS over HTTPS.
  5. Choose “Off”.

You can now edit your Hosts File and proceed with testing your new site like you normally would.

Was this article helpful?