DNS is where a lot of privacy gets lost. Every domain you visit goes through DNS — and your ISP's default DNS resolver can see (and often sells) your complete browsing history, even if you use HTTPS everywhere.
The Problem with Default DNS
When you type github.com, your browser asks a DNS resolver to find the IP address. By default, this uses your ISP's resolver, which:
- Sees every domain you query
- May sell this data to third parties
- May redirect NXDOMAIN (nonexistent domains) to ad pages
- May comply with government requests to block certain domains
HTTPS protects the content of your connection. DNS leaks which domains you visit.
DNS over HTTPS (DoH) in Firefox
Firefox has its own built-in DoH implementation, separate from the OS DNS.
Enable it: Settings → Privacy & Security → DNS over HTTPS.
Options:
- Off — Uses OS/ISP DNS
- Increased protection — Uses DoH but falls back to OS DNS if DoH fails
- Max protection — DoH only; if DoH fails, connection fails (more private, less robust)
- Custom — Use your own DoH server
Firefox's Trusted Recursive Resolver (TRR)
Mozilla partnered with Cloudflare (cloudflare-dns.com) and NextDNS as default DoH providers. These are bound by a privacy agreement with Mozilla:
- Can't sell DNS data
- Can't retain full IP + domain query logs
- Must publish transparency reports
The default "Max Protection" mode in the US uses Cloudflare with these restrictions.
Using NextDNS with Firefox
NextDNS is a better choice than Cloudflare if you want:
- Per-device filtering rules
- Ad/tracker blocking at the DNS level
- Detailed per-domain query logs (that you control)
- Configurable blocklists (similar to pihole but cloud-based)
- Sign up at nextdns.io
- Get your configuration ID
- Firefox settings → DNS over HTTPS → Custom → enter:
https://dns.nextdns.io/YOUR_ID
Every device that uses your NextDNS profile gets DNS-level blocking. Works for all DNS queries from that device, not just the browser.
Self-Hosted DNS with Pi-hole + DoH
For the most control, run Pi-hole at home:
- Pi-hole on a Raspberry Pi (or any server) handles local DNS
- Pi-hole blocks ads/trackers at the DNS level for your whole network
- Pair with
cloudflaredfor DoH between Pi-hole and upstream resolvers
Then point Firefox to your Pi-hole's DoH endpoint:
https://YOUR_PI_HOLE_IP/dns-query
This gives you complete control over what gets blocked and logged, without any third-party resolver seeing your queries.
DNSSEC: Signature Validation
DNSSEC ensures DNS responses aren't tampered with (MITM). Firefox validates DNSSEC when using DoH resolvers that support it (Cloudflare and NextDNS both do).
You can check if a specific domain supports DNSSEC at dnssec-debugger.verisignlabs.com.
DNSCrypt (Not Supported in Firefox)
Firefox supports DoH (DNS over HTTPS) but not DNSCrypt. If you want DNSCrypt, you'd need to run a local DNSCrypt resolver and point Firefox's DoH at it.
Tools: dnscrypt-proxy (runs locally, supports DNSCrypt upstream providers, can expose a local DoH endpoint).
Split-Horizon DNS (Corporate Networks)
One practical issue: if your company uses internal DNS (for intranet hostnames like dashboard.corp.internal), DoH can break internal name resolution.
Firefox's fallback mode: "Increased Protection" (not "Max") falls back to OS DNS for queries that DoH can't resolve. For most corporate setups, this means internal hostnames still resolve.
If your company uses strict DoH blocking: you may need to disable DoH on work networks. Firefox doesn't currently have per-network DoH configuration (unlike macOS's encrypted DNS profiles).
Checking What DNS Firefox Is Using
about:networking → DNS Cache — shows resolved domains and which resolver Firefox used.
Or use a DNS leak test service: search "DNS leak test" — multiple tools check which resolver your browser queries appear to come from.
What DoH Doesn't Protect
- Your ISP still sees your IPs — Even with DoH, your ISP sees you're connecting to github.com's IP (which can be reverse-mapped to the domain)
- SNI (Server Name Indication) — In TLS handshakes, the domain name may still be visible unless ECH (Encrypted Client Hello) is supported
- Your DoH provider still sees your queries — It just shifts trust from your ISP to your DoH provider
For full traffic privacy: DoH + VPN + ECH together. But that's a significantly more involved setup.
DoH in Firefox is worth enabling — it protects against passive ISP-level DNS surveillance with minimal setup. NextDNS or a self-hosted Pi-hole gives you more control than the defaults.
Top comments (0)