Skip to main content
Security Guide

DNS Security Guide: Stop DNS Leaks and Protect Your Privacy (2026)

Your DNS queries reveal every website you visit. Here's how to encrypt them with DNS-over-HTTPS, DNS-over-TLS, and VPN DNS protection.

Marcus Johnson — VPN & Privacy Analyst
Marcus Johnson·VPN & Privacy Analyst
Updated
2 min read

The DNS Privacy Problem

Every time you type a website address, your device sends a DNS query to translate the domain name (google.com) into an IP address (142.250.80.46). By default, these queries are sent in plain text, unencrypted, to your ISP's DNS servers.

This means your ISP has a complete log of every website you visit — even if those websites use HTTPS. A VPN encrypts your DNS queries, but understanding DNS security helps you protect yourself even without a VPN.

What DNS Reveals About You

Your unencrypted DNS queries reveal:

  • Every website you visit (domain names)
  • When you visit them (timestamps)
  • How frequently you visit them (patterns)
  • What devices you use (different DNS fingerprints)

Your ISP can — and often does — sell this data to advertisers or hand it to government agencies.

Solution 1: Use a VPN (Most Complete)

The simplest and most effective DNS protection is a VPN. All quality VPNs route your DNS queries through their own encrypted DNS servers, preventing your ISP from seeing them.

All five VPNs we review (NordVPN, Surfshark, ExpressVPN, Proton VPN, Mullvad) handle DNS encryption automatically. No configuration needed.

Solution 2: DNS-over-HTTPS (DoH)

If you can't use a VPN, DNS-over-HTTPS encrypts DNS queries in your browser:

Firefox (Best DoH Support)

  1. Settings > Privacy & Security > DNS over HTTPS
  2. Enable and choose Cloudflare (1.1.1.1) or NextDNS

Chrome

  1. Settings > Privacy and security > Security
  2. Enable "Use secure DNS" and select Cloudflare or Google

Windows 11

  1. Settings > Network > Wi-Fi/Ethernet > DNS
  2. Set to Manual and enter 1.1.1.1 (Cloudflare) or 9.9.9.9 (Quad9)
  3. Enable "DNS over HTTPS"

Solution 3: Change Your DNS Servers

Even without DoH, using privacy-focused DNS servers is better than your ISP's:

| Provider | Primary | Secondary | Privacy | Filtering | |----------|---------|-----------|---------|-----------| | Cloudflare | 1.1.1.1 | 1.0.0.1 | No logging | None | | Quad9 | 9.9.9.9 | 149.112.112.112 | No logging | Malware blocking | | NextDNS | Custom | Custom | Configurable | Customizable | | Google | 8.8.8.8 | 8.8.4.4 | Some logging | None |

DNS Leak Testing

Even with a VPN, DNS leaks can expose your queries. Test regularly:

  1. Connect to your VPN
  2. Visit dnsleaktest.com or ipleak.net
  3. Run the extended test
  4. All DNS servers should show the VPN provider's servers, NOT your ISP's

If you see your ISP's DNS servers, you have a DNS leak. Fix: ensure your VPN's DNS leak protection is enabled, or manually set DNS to your VPN provider's servers.

How We Verified

DNS encryption methods tested on Windows 11, macOS Sequoia, Firefox 134, and Chrome 131. DNS leak tests conducted with 5 VPN providers across 50 tests each. April 2026.

Share:XLinkedInEmail

Related Guides

Was this guide helpful?

Advertisement

Ready to Get Protected?

Take the next step in securing your remote work setup.

Sources & Citations

  1. 1Cloudflare: What is DNS? — cloudflare.com/learning/dns
  2. 2Mozilla: DNS over HTTPS (DoH) — support.mozilla.org