Step 1: Enable DNS over HTTPS (DoH)
Go to Settings → Privacy & Security, scroll to the bottom, and under "DNS over HTTPS" select "Max Protection." Choose Cloudflare or NextDNS as your provider.
Step 2: Use about:config for Advanced Control
Type about:config in the address bar. Search for and set these values:
network.trr.mode→ set to 3 (DoH only)network.dns.disablePrefetch→ truenetwork.predictor.enabled→ false
Step 3: Use a VPN with DNS Leak Protection
For the most reliable protection, pair Firefox's settings with a VPN like NordVPN. It routes all DNS queries through encrypted servers, ensuring nothing leaks — even if Firefox's settings are reset.
Step 4: Verify the Fix
Return to our DNS Leak Checker and run a new test. All DNS servers should now match your VPN's location.