What Is a DNS Leak? How to Detect and Prevent Them

DNS Leak Test

Understanding DNS Leak Test

A technical overview of DNS leaks — what they are, how the test works, what each signal indicates, and how to resolve one.

01

What is a DNS Leak?

Every time you visit a website, your device first resolves the domain name (e.g. example.com) to an IP address using DNS (Domain Name System). This lookup happens before any data is transferred — and it reveals every domain you visit.

A DNS leak occurs when you are connected to a VPN but your DNS queries are still being sent to your ISP's resolver instead of through the VPN tunnel. This means your internet provider can see every domain you visit, even though your traffic appears encrypted.

🔍 Why it matters

DNS leaks are one of the most common privacy failures in VPN configurations. Your ISP cannot see the content of HTTPS traffic, but DNS queries reveal the domains you visit — which is often sufficient to build a detailed profile of your browsing activity.

02

How the Test Works

The test works by exploiting the fundamental mechanics of DNS resolution:

  1. 1Generate unique probes. The test generates 10 unique hostnames under dns.networktests.com (e.g. a1b2c3d4e5f6g7h8-1.dns.networktests.com). Each hostname is used only once and expires after 90 seconds.
  2. 2Trigger DNS queries. Your browser fetches each hostname, forcing the operating system to resolve it through whatever DNS resolver your device is configured to use — your ISP's resolver, a VPN DNS server, or a public resolver like 1.1.1.1.
  3. 3Capture at the authoritative DNS server. networktests.com operates its own authoritative DNS server. When your resolver looks up the probe hostname, it must query this server. The server records the IP address of each resolver that contacts it.
  4. 4Enrich and analyse. Each resolver IP is looked up to determine the organisation (ASN), country, and whether it belongs to a known encrypted DNS provider. The results are cross-referenced with your VPN detection status.

ℹ️ What the server sees

The IP address captured at the DNS server is the recursive resolver's IP, not your device's IP. Your device sends DNS queries to its configured resolver (e.g. 8.8.8.8 or your ISP's resolver), which then queries our server on your behalf. This is exactly what makes the test meaningful — you can see which organisation is handling your DNS queries.

03

Signal 1 — VPN / DNS Consistency

This is the primary signal. It compares the organisation (ASN) of your DNS resolver against your detected VPN or public IP to determine whether DNS queries are reaching the right destination.

VPN Detected?
Resolver
Result
Meaning
Yes
Matches VPN ASN
✅ Secure
DNS routes through your VPN — no leak
Yes
ISP resolver
🔴 DNS Leak
DNS bypasses VPN — your ISP can see your queries
Yes
3rd-party (Google, CF)
🔵 DNS Bypass
DNS bypasses VPN but is encrypted — no ISP exposure
No
ISP resolver
🔵 ISP DNS
No VPN — your ISP can observe all DNS queries
No
3rd-party resolver
🔵 Third-party DNS
No VPN — DNS handled by a third-party provider

ℹ️ DNS Bypass vs DNS Leak

A DNS Leak means your ISP can see your DNS queries even though you are using a VPN — a genuine privacy failure. A DNS Bypass means DNS does not go through your VPN, but is still handled by an encrypted third-party resolver such as Cloudflare or Google. Your ISP cannot see the queries. This is not a leak — it is a deliberate configuration choice that trades VPN-provider DNS for a public encrypted resolver.

04

Signal 2 — DNS Query Encryption

Traditional DNS operates in plaintext over UDP port 53. Anyone on the network path between your device and the resolver — including your router, ISP, or a network operator — can read every DNS query you send.

The test checks whether your resolver belongs to a known provider that supports encrypted DNS:

  • DNS-over-HTTPS (DoH) — DNS queries sent over an encrypted HTTPS connection
  • DNS-over-TLS (DoT) — DNS queries sent over an encrypted TLS connection on port 853

⚠️ Important limitation

This signal checks whether your resolver supports encrypted DNS, based on a list of known providers. It does not confirm that your device-to-resolver connection is actually encrypted. For example, if your resolver is 1.1.1.1 but your device queries it over plaintext port 53 (rather than DoH/DoT), the signal will show "Encrypted" based on Cloudflare's known capabilities — which may not reflect your actual configuration.

05

Signal 3 — Resolver Geography

This signal compares the physical location of your DNS resolver against your own detected country.

Resolver Country
Result
Typical Cause
Same as your country
✅ Local
Normal — resolver is geographically close
Different country
🔵 Foreign
VPN DNS server, global provider (Cloudflare, Google), or unusual routing

A foreign resolver is not necessarily a problem. Global DNS providers like Cloudflare (1.1.1.1) and Google (8.8.8.8) route queries through anycast networks, so the server that responds may be in a different country than your device.


06

Resolver Table

The resolver table lists every unique DNS resolver that responded to the test probes, along with:

  • IP address — the resolver's public IP
  • Organisation — the ISP, cloud provider, or DNS service operating the resolver
  • ASN — the Autonomous System Number (network identifier)
  • Country — where the resolver is physically located
  • Encryption — whether the resolver supports DoH or DoT

Multiple resolvers appearing in the table is normal — large providers like Google and Cloudflare use multiple servers, and each of the 10 probe queries may be handled by a different node.


07

No DNS Queries Captured

If the test shows "No DNS Queries Captured", there are several possible explanations:

  • Browser-native DoH. Chrome, Firefox, and Edge can be configured to use DNS-over-HTTPS directly within the browser, bypassing the operating system resolver entirely. The browser resolves hostnames itself and never contacts the system's configured DNS server — so the OS resolver (and your VPN's DNS) never see the query.
  • Aggressive DNS caching. DNS responses are cached by the OS, browser, or resolver. Although each probe uses a unique hostname, some caching layers may pre-emptively block or discard lookups for unfamiliar domains.
  • Firewall or security software. Some security products intercept or block DNS queries to unknown domains, preventing the probes from reaching the authoritative server.

💡 Browser-native DoH and VPN

If your browser uses built-in DoH, DNS queries are handled by the browser's chosen resolver (typically Cloudflare or Google) and do not pass through your VPN's DNS servers. This may or may not be considered a leak depending on your threat model — the queries are encrypted, but they bypass your VPN provider's DNS.

08

How to Fix a DNS Leak

If a DNS leak is detected while using a VPN, try the following steps:

  1. 1Use your VPN's built-in DNS. Most reputable VPN clients configure DNS automatically and route queries through their own servers. Ensure you are using the official VPN application rather than a manual OpenVPN or WireGuard configuration.
  2. 2Enable DNS leak protection. Many VPN apps include a specific 'DNS leak protection' or 'private DNS' setting. Enable it if available.
  3. 3Disable browser-native DoH. In Chrome: Settings → Privacy and security → Security → Use secure DNS → Off. In Firefox: Settings → General → Network Settings → Enable DNS over HTTPS → Off. When browser-native DoH is active, the browser resolves DNS independently using an encrypted channel to a public resolver such as Cloudflare or Google, bypassing the VPN tunnel entirely. Because the VPN cannot intercept these queries, VPN providers typically recommend disabling DoH so that all DNS traffic passes through their servers and remains within the tunnel. Our recommendation: if you are comfortable with your VPN provider not having visibility into your DNS queries, keeping DoH enabled is a valid alternative — your queries will be encrypted and routed to the resolver of your choice rather than your VPN provider's DNS servers.
  4. 4Set DNS manually to your VPN's servers. If your VPN provides DNS server IPs, configure them explicitly in your operating system's network settings.
  5. 5Use a VPN with full-tunnel mode. Split-tunnel VPNs route only some traffic through the VPN. Ensure full-tunnel mode is enabled so all DNS queries are captured by the VPN.