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·CEHCCNA·VPN & Privacy Analyst
Updated
Marcus Johnson — VPN & Privacy Analyst

VPN & Privacy Analyst · London, UK

Updated Editorial policy
Editor's picks

Our Recommended VPNs

Chosen after real-world testing across speed, privacy, and streaming. Each ranking is independent — we buy every VPN at retail and test it ourselves.

EDITOR'S PICK
NordVPN logo
Best Overall
NordVPN
4.8/ 5

Fastest speeds, audited no-logs, 6000+ servers

Audited no-logs policyThreat Protection blocks malware10 devices per account30-day money-back guarantee
Save 74%
was $12.99/mo
$3.39/mo
Get NordVPN
30-day money-back guarantee
Read full NordVPN review
Surfshark logo
Best for Unlimited Devices
Surfshark
4.6/ 5

Unlimited devices, CleanWeb blocker, 100+ countries

Unlimited simultaneous devicesCleanWeb ad & malware blockerRAM-only server network30-day money-back guarantee
Save 87%
was $15.45/mo
$1.99/mo
Get Surfshark
30-day money-back guarantee
Read full Surfshark review
Proton VPN logo
Best for Privacy
Proton VPN
4.5/ 5

Swiss privacy laws, open-source, free tier

Swiss jurisdiction (no data laws)Open-source and auditedSecure Core multi-hopFree tier available forever
50% off
was $9.99/mo
$4.99/mo
Get Proton VPN
30-day money-back guarantee
Read full Proton VPN review
FastestVPN logo
Best Budget
FastestVPN
4.2/ 5

Lifetime plans, 10 devices, ad blocker

Lifetime deal available10 devices per accountBuilt-in ad blockerNo-logs policy
Save 89%
was $10/mo
$1.11/mo
Get FastestVPN
30-day money-back guarantee
Read full FastestVPN review

We earn a commission when you click “Get” buttons, at no extra cost to you. Read our affiliate disclosure

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, Proton VPN, FastestVPN) 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.

Found this helpful?

Share it with someone who needs it

Continue learning

Related Guides

Was this guide helpful?

Sources & Citations

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