How to Set Up DNS over HTTPS in Firefox
This guide provides detailed instructions for configuring DNS over HTTPS (DoH) in Mozilla Firefox, including basic setup, advanced options, and troubleshooting tips.
Prerequisites
- Mozilla Firefox browser (version 68 or later)
- Basic understanding of DNS concepts
- Access to Firefox settings
Basic Configuration
Step 1: Access Firefox Settings
- Open Firefox
- Click the menu button (☰) in the top-right corner
- Select “Settings”
- Scroll down to “Network Settings”
- Click the “Settings…” button
Step 2: Enable DNS over HTTPS
- In the Connection Settings dialog:
- Scroll down to find “Enable DNS over HTTPS”
- Check the box to enable it
- Choose your DNS over HTTPS provider:
- Default: Cloudflare
- Custom provider
Step 3: Configure Custom Provider
If you want to use a custom DoH provider:
- Select “Custom”
- Enter your preferred DoH provider URL, for example:
https://dns.google/dns-query https://1.1.1.1/dns-query https://dns.quad9.net/dns-query
Advanced Configuration
Using about:config
For advanced users, Firefox offers additional DoH settings through about:config:
- Enter “about:config” in the address bar
- Accept the risk warning
- Search for “network.trr”
- Configure the following settings:
network.trr.mode
:- 0: Off (default)
- 1: Race native DNS with DoH
- 2: DoH first, with fallback to native DNS
- 3: DoH only
- 5: Off by choice
network.trr.uri
: Your DoH provider URLnetwork.trr.bootstrapAddress
: Provider’s IP addressnetwork.trr.confirmation_telemetry_enabled
: Enable/disable telemetry
Enterprise Configuration
For enterprise deployments, you can configure DoH through policies:
{
"policies": {
"DNSOverHTTPS": {
"Enabled": true,
"ProviderURL": "https://dns.example.com/dns-query",
"Locked": true
}
}
}
Verification
Method 1: Using Firefox’s Built-in Tools
- Open a new tab
- Enter “about:networking#dns” in the address bar
- Check the “TRR” column:
- “true” indicates DoH is being used
- “false” indicates standard DNS
Method 2: Using Developer Tools
- Press F12 to open Developer Tools
- Go to the Network tab
- Filter by “DNS”
- Visit a website
- Look for “HTTPS” in the protocol column
Method 3: Using Online Tools
- Visit DNS Leak Test
- Run the standard test
- Verify that queries are going through your chosen DoH provider
Troubleshooting
Common Issues
-
DoH Not Working
- Check if your network blocks HTTPS on port 443
- Verify the DoH provider URL is correct
- Try a different DoH provider
- Check
network.trr.mode
setting
-
Performance Issues
- Try different
network.trr.mode
settings - Use a geographically closer DoH provider
- Check your network connection quality
- Monitor DNS resolution times
- Try different
-
Compatibility Issues
- Update Firefox to the latest version
- Check for conflicting add-ons
- Reset Firefox DNS settings
- Clear Firefox cache
Advanced Troubleshooting
-
Check DNS Resolution
# Using dig command dig @1.1.1.1 example.com
-
Monitor DNS Traffic
# Using tcpdump sudo tcpdump -i any port 443 and host dns.google
Best Practices
-
Provider Selection
- Choose providers with strong privacy policies
- Consider providers with DNSSEC support
- Test provider performance
- Review provider’s logging practices
-
Security Considerations
- Enable DNSSEC validation
- Use trusted DoH providers
- Regularly update Firefox
- Monitor DNS resolution patterns
-
Performance Optimization
- Use
network.trr.mode
= 2 for balance - Configure bootstrap address
- Enable DNS prefetching
- Monitor resolution times
- Use
Next Steps
- Server List - Choose the right DoH provider
- Security Best Practices - Ensure secure configuration
- Performance Optimization - Optimize your setup
- FAQ - Get help with common issues