A VPN encrypts your traffic and masks your IP address — but there is a quieter channel that can betray you: DNS. Every time you visit a website, your device asks a DNS server to translate the domain name into an IP address. If those DNS requests travel outside your encrypted VPN tunnel, anyone watching — your internet provider, a network operator, or an attacker — can see every site you visit. That is a DNS leak.
DNS leaks are particularly sneaky because everything looks protected. Your IP address shows the VPN server’s location, your traffic is encrypted, and the VPN app reports a healthy connection. Meanwhile, a parallel stream of plaintext DNS queries is quietly revealing your browsing history. A DNS leak test is how you catch it.
This guide explains what DNS leaks are, why they happen, how to test for them in under a minute, and how VPNs prevent them — plus what to do if your tests keep failing.
- What DNS Is and Why It Can Leak
- Common Causes of DNS Leaks
- How to Run a DNS Leak Test
- Reading Your Test Results
- How VPNs Fix DNS Leaks
- What to Do If You’re Still Leaking
What DNS Is and Why It Can Leak
DNS — the Domain Name System — works like the internet’s phone book. When you type a website address, your device queries a DNS server to find the numerical IP address where that site lives. These queries happen constantly, before almost every connection you make, and by default they are sent in plaintext to your internet provider’s DNS servers.
A VPN is supposed to reroute these queries through its own encrypted DNS servers inside the tunnel. When that works, your ISP sees only encrypted traffic heading to the VPN server — it cannot tell which sites you are visiting. When it fails, the DNS queries escape the tunnel and go to your ISP’s servers in the open, even though everything else remains encrypted. If you want the full background, our guide on what DNS is and how it works covers the fundamentals.
The privacy impact is significant. DNS queries reveal your browsing history in near-real time: every site visited, every app phoning home, every service you use. For someone relying on a VPN to keep browsing private from their ISP or to mask their location, a DNS leak largely defeats the purpose.
Common Causes of DNS Leaks
The most frequent cause is simply a VPN that does not route DNS properly — usually a budget or poorly maintained service, or a manual VPN configuration missing DNS settings. But leaks can happen with good providers too. Switching networks (from Wi-Fi to mobile data, for instance) can briefly restore your device’s default DNS before the VPN reasserts itself.
Operating system quirks contribute as well. Windows has a feature called “smart multi-homed name resolution” that can send DNS queries to all available servers simultaneously — including your ISP’s — in the name of speed. IPv6 is another classic culprit: if your VPN handles IPv4 traffic but your device sends DNS queries over IPv6, those queries bypass the tunnel entirely.
Browser features can leak independently of your VPN. DNS-over-HTTPS in Chrome or Firefox, while generally good for privacy, may route queries to the browser’s chosen resolver outside your VPN’s DNS — which is not a “leak” to your ISP but does mean your VPN provider is not handling DNS as expected. And outdated VPN apps missing security fixes may lack the leak-protection features current versions include.
How to Run a DNS Leak Test
Testing takes less than a minute. First, connect your VPN to the server you normally use. Then open a DNS leak testing website — several reputable free tools exist that show which DNS servers your queries reach. Run the standard test and note the results. For comparison, you can also run the test with the VPN disconnected to see your baseline.
For a thorough check, run both a standard and an extended test. The extended test sends more queries over a longer period, which can catch intermittent leaks that a quick test misses — for example, leaks that only occur during network transitions. Test on each device you use, since DNS behavior varies between Windows, macOS, Android, and iOS.
Make testing a habit, not a one-time event. Run a leak test after installing a new VPN app, after major app updates, when you change servers or protocols, and any time you alter network settings. It takes seconds and verifies the single most important thing your VPN promises: that your ISP cannot see your browsing.
Reading Your Test Results
A clean result shows DNS servers belonging to your VPN provider — typically in the same country as your VPN server, owned by the provider or its infrastructure partners. That means your queries are traveling inside the encrypted tunnel. You are protected.
A leak shows DNS servers belonging to your internet provider, your mobile carrier, or companies like Google when you did not choose them — especially servers in your real home country while connected to a VPN server elsewhere. If the test shows your ISP’s servers, your DNS is leaking. Mixed results (some VPN servers, some ISP servers) indicate a partial leak, often caused by the Windows multi-homed resolution behavior or IPv6.
One nuance: seeing a third-party DNS like Cloudflare or Quad9 is not necessarily a leak if you deliberately configured it — what matters is whether the servers belong to your VPN provider or your own chosen resolver, versus your ISP or an unexpected party. The Cloudflare Learning Center explains how DNS resolution paths work if you want to dig deeper into interpreting results.
How VPNs Fix DNS Leaks
Good VPN providers prevent leaks architecturally. They operate their own DNS servers and configure their apps to force all DNS queries through the encrypted tunnel to those servers — overriding your system’s default DNS settings while connected. Many also implement firewall rules that block any DNS traffic attempting to leave outside the tunnel, so even a misbehaving app cannot leak.
Look for a few specific features when choosing a provider: private DNS servers owned by the VPN company (not rented from a third party), DNS leak protection toggles in the app settings, and IPv6 leak protection or the option to disable IPv6 traffic. These should be on by default in any serious 2026-era VPN app.
Some providers go further with DNS-level extras: blocking DNS requests to known malware or tracker domains, which adds a layer of protection beyond privacy. This is a nice bonus, but do not confuse it with the core requirement — the essential job is keeping your queries inside the tunnel, and that should work flawlessly before any extras matter.
What to Do If You’re Still Leaking
If tests keep showing leaks, work through fixes in order. First, enable every leak-protection option in your VPN app: DNS leak protection, IPv6 protection, and the kill switch. Second, manually set your system’s DNS to your VPN provider’s DNS addresses (or a trusted public resolver) so there is no fallback to your ISP’s servers. Third, disable the Windows smart name-resolution feature and consider disabling IPv6 if your provider does not handle it.
In your browser, check DNS-over-HTTPS settings — either disable it so the VPN handles DNS, or set it to a resolver you trust, understanding the tradeoff. Clearing your browser cache after changing DNS settings ensures no stale location data interferes with your tests.
If nothing resolves the leak, the problem is likely the provider’s infrastructure, not your settings — and that is grounds to switch. A VPN that cannot keep DNS inside its tunnel is failing at a fundamental task. The Electronic Frontier Foundation maintains guidance on evaluating VPN trustworthiness, and consistent DNS leaks are one of the clearest signals that a provider does not deserve your traffic.