To disable Firefox's built-in DNS-over-HTTPS feature and switch to Cloudflare DNS on Windows, you must access the advanced configuration editor. Navigate to your network settings to ensure no system-level overrides exist, then type
about:config in the address bar. Accept the warning, search for
network.trr.mode, change it from 3 (DoH) to 0 (Off), and restart the browser to apply the standard DNS resolution provided by your operating system or custom provider.
Understanding Firefox DNS Settings
Firefox includes a privacy-focused feature called DNS-over-HTTPS (DoH). By default, this encrypts your domain name lookups, preventing your Internet Service Provider (ISP) from seeing which websites you visit. While this enhances security, some users prefer to manage their own DNS providers, such as Cloudflare (1.1.1.1) or Google (8.8.8.8), for reasons related to local network policies, speed optimization, or specific filtering requirements. When you want to use these external services, you often need to disable Firefox's native DoH implementation to prevent conflicts or redundant encryption layers.
The core setting controlling this behavior is located deep within Firefox's internal preferences. It is not available through the standard graphical user interface options found in the main settings menu. Instead, it resides in the
about:config page, which allows power users to modify hidden parameters. Understanding how this mode works is crucial before making changes, as incorrect values can break internet connectivity or revert to less secure methods unexpectedly.
Configuring System-Level DNS on Windows
Before altering browser-specific settings, it is wise to verify that your Windows operating system is configured to use the desired DNS servers. If Windows itself is using your ISP's DNS, Firefox might inherit those settings unless explicitly overridden. To check or change this, open the
Network & Internet settings from the Start menu. Select your active connection, whether Wi-Fi or Ethernet, and click on
Hardware properties or
Edit DNS server assignment.
If you intend to use Cloudflare globally across all applications, set the IPv4 DNS servers to
1.1.1.1 and
1.0.0.1, and IPv6 to
2606:4700:4700::1111 and
2606:4700:4700::1001. This ensures that any application not using its own private DNS resolver will benefit from Cloudflare's infrastructure. However, if you only wish to affect Firefox while leaving other apps with default settings, you can skip this step and rely solely on the browser configuration changes described below. Note that changing system DNS affects all programs, so proceed with caution if you have specific corporate or home network requirements.
For more information on managing Windows features, you might find
Photos Folders Turned Black useful for troubleshooting other display-related issues.
Accessing the About:Config Editor
The primary method to control Firefox's DNS behavior is via the
about:config interface. Type this exact string into the address bar and press Enter. Firefox will display a large orange warning screen stating, "Proceed with Caution." This is a standard safety measure because modifying these values can impact browser stability or security. Click the button labeled
Accept the Risk and Continue to access the preference list.
Once inside, you will see a search bar at the top. The interface may look intimidating due to the sheer number of technical parameters, but you only need to focus on one specific key. In the search field, type
network.trr.mode. This parameter controls the "Trusted Recursive Resolver" mode, which is Firefox's technical term for DNS-over-HTTPS. The current value will likely be displayed prominently. If it is set to
3, it means DoH is enabled and managed by Firefox. If it is
5, it indicates that DoH is disabled entirely, which might already solve your problem if you are experiencing issues.
You may also encounter the setting
network.trr.uri. This defines the specific URL of the DNS provider Firefox uses when DoH is active. Common defaults include Cloudflare's endpoint (
https://mozilla.cloudflare-dns.com/dns-query) or Quad9's. Changing the mode to off will ignore this URI entirely, forcing Firefox to fall back to the OS-level DNS resolution.
Changing the Mode Value
To disable the 'Choose Your Own DNS' feature effectively, you need to change the value of
network.trr.mode. Double-click the entry in the search results. A dialog box will appear showing the current integer value. Replace this value with
0.
Here is what the different modes mean:
- 0 (Off): Disables DNS-over-HTTPS completely. Firefox uses the standard DNS protocol provided by your operating system.
- 1 (Fallback): Uses DoH primarily but falls back to standard DNS if the DoH service fails.
- 2 (Prefer): Prefers DoH but allows standard DNS as a backup.
- 3 (Only): Forces DoH exclusively. Standard DNS queries are blocked.
- 5 (Off): Similar to 0, but strictly disables the feature without allowing fallback mechanisms.
Setting it to
0 is the most direct way to stop Firefox from handling DNS separately. After entering
0, close the dialog box. The change takes effect immediately; you do not need to restart the browser, although restarting ensures that any cached DNS records are cleared. You can verify the change by visiting a site like
cloudflare.com/cdn-cgi/trace and checking the
dns field in the output. If it shows your ISP's resolver instead of Cloudflare's DoH endpoint, the setting has been applied correctly.
For tips on managing your browsing session efficiently, consider reading
How to Close Firefox Windows: Preferred Extension Solution.
Troubleshooting and Verification
If you disable DoH and find that you cannot connect to certain sites, it may be due to firewall restrictions or ISP blocking of standard DNS ports. In such cases, you might need to re-enable DoH or configure your router to allow outbound DNS traffic. Additionally, ensure that no third-party extensions are interfering with your network settings. Extensions like privacy blockers sometimes enforce their own DNS rules, which can conflict with
about:config changes.
It is also important to note that disabling DoH reduces the privacy layer Firefox provides against network eavesdroppers. Your ISP or network administrator will be able to see the domains you visit again. If you still want some level of encryption but prefer Cloudflare, you can keep
network.trr.mode at
3 but change
network.trr.uri to point to a different provider, though Cloudflare is already a common default. For most users switching to Cloudflare DNS, simply turning off the feature (Mode 0) and letting Windows handle the resolution to 1.1.1.1 is the cleanest approach.
Frequently Asked Questions
Does disabling DoH make my browsing slower?
No, disabling DoH typically does not slow down your browsing; in fact, it may slightly improve performance on fast networks because it removes the overhead of establishing encrypted TLS connections for every DNS lookup. However, if your ISP's DNS servers are geographically distant or overloaded, you might notice a minor delay compared to a well-cached DoH provider.
Can I use Cloudflare DNS without enabling DoH?
Yes, you can configure Windows to use Cloudflare's IP addresses (1.1.1.1) as your standard DNS resolver while keeping Firefox's DoH disabled. This allows Firefox to resolve domains using Cloudflare's infrastructure without encrypting the query via HTTPS, relying instead on the system-level DNS configuration.
What happens if I set the mode to 5 instead of 0?
Setting the mode to 5 also disables DNS-over-HTTPS, similar to mode 0. The primary difference is subtle: mode 5 strictly prevents the browser from attempting to use DoH under any circumstances, whereas mode 0 might allow fallback behavior in rare edge cases depending on the Firefox version. Both are effective for disabling the feature.
Will this change affect my ability to access .onion sites or Tor?
Disabling standard DoH does not directly impact Tor Browser functionality, as Tor uses its own specialized routing. However, if you are using the regular Firefox with a Tor proxy extension, ensuring that DNS leaks are prevented becomes critical. You should verify that your DNS settings are not leaking queries outside the Tor circuit when using such configurations.
How do I revert this change if I experience connectivity issues?
To revert the change, return to
about:config, find
network.trr.mode, and double-click it again. Change the value back to
3 (or whatever was previously selected) to restore Firefox's default DoH behavior. This will immediately re-enable encrypted DNS lookups managed by Firefox.