A DNS leak happens when your device's domain-name lookups bypass the path your VPN was supposed to use and reach another resolver, usually your internet provider's. Your VPN still hides your IP address, but the resolver can see every domain you look up and when you looked it up. The only reliable way to know is to run a leak test, then fix the VPN, browser or system setting that caused it.
Key takeaways
- A DNS leak exposes the domains you look up to whoever runs the resolver, even while your IP address stays hidden behind a VPN.
- Test with a browser leak test and a command-line check, comparing a baseline without the VPN to the result with it on.
- Most leaks are fixed by letting the VPN manage DNS, aligning the browser's secure DNS setting, and turning off split tunneling while you diagnose.
Your VPN is connected, the IP check shows the exit server's address, and every page loads. Everything looks private — except it may not be. Your DNS lookups could be going straight to your ISP.
What is a DNS leak?
A DNS leak happens when domain-name lookups bypass the DNS path your VPN was supposed to use and reach another resolver, commonly one operated by your internet provider. The VPN still encrypts your traffic, but the lookups escape the tunnel.
DNS, the Domain Name System, translates names such as example.com into IP addresses that devices can route to. When you look up a domain, your device asks a recursive resolver to find the answer. With a VPN, that resolver should be the VPN provider's own server, or one you deliberately chose, and the query should travel inside the encrypted tunnel.
A leak happens when some or all of those queries take a different path, usually to your ISP's resolver or a resolver on the local network, outside the tunnel. It is silent: nothing breaks, pages load at normal speed, and no warning appears. The only way to know is to test.
What does a DNS leak expose?
A DNS leak does not expose your full browsing history. A DNS lookup reveals the domain name and the time of the lookup, not the exact page or file you opened, and cached names may trigger no lookup at all.
But the domain list alone is plenty. It shows which services you use and when you use them: your email provider, your bank, your health portal, your streaming services. Combined with timing, it can build a detailed picture of your habits, and the resolver's location can hint at where you are.
That matters most when you chose a VPN for privacy. If your ISP can see every domain you look up, the VPN is not delivering the privacy you paid for, even though your real IP address stays hidden. A leak test is therefore a privacy check, not just a technical curiosity.
What causes a DNS leak?
Most DNS leaks are configuration problems, not a bug in the VPN service itself. The usual causes are consistent across VPN clients, browsers and operating systems.
- The VPN app is not managing DNS. Some clients, especially manual or split-tunnel setups, route traffic through the tunnel but leave the system's DNS settings untouched.
- The browser resolves on its own. A browser with DNS over HTTPS enabled sends its lookups to the DoH provider it was configured with, bypassing the system resolver and the VPN's DNS with it.
- Split tunneling is on. Traffic you excluded from the VPN, including its DNS lookups, goes out on the normal connection.
- More than one network is active. Wi-Fi, Ethernet and a mobile hotspot at the same time can give the operating system several resolvers to choose from, and it may not pick the VPN's.
- IPv6 goes around an IPv4-only VPN. If the VPN handles IPv4 but not IPv6, IPv6-capable lookups can leave through the physical connection.
- A fallback after a slow answer. If the VPN's resolver is slow or unreachable for a moment, the operating system may fall back to the DHCP-provided resolver.
None of these is a reason to abandon a VPN. All of them are fixable once you can see which one is happening, which is why testing comes before changing settings.
How does a DNS leak test work?
A browser cannot ask the operating system which resolver it uses, so a leak test works from the other side. The test page makes your browser look up a set of unique hostnames that have never been queried before, under a domain whose authoritative DNS server is run by the tester.
No cache anywhere can already hold those names, so the resolver your device really uses has to query that authoritative server, and the server records the IP address each query came from. That recorded IP is the egress address of the resolver that handled your lookup, whatever your settings say.
If it belongs to your ISP while your VPN is connected, your DNS is leaking. The test cannot be fooled by a setting that claims otherwise, because it observes the traffic, not the configuration.
How do you test for a DNS leak?
Test in two ways: a browser test, and a command-line check. The browser test exercises the browser's resolver path, which may include the browser's own secure DNS setting. The command line exercises the operating system's resolver instead, so run both.
Test 1: run a browser leak test
Use a dedicated test site such as DNSLeakTest, browserleaks.com or ipleak.net, as described in the WhatIsMyIP DNS leak test guide. The procedure matters more than the tool: run it once as a baseline, then again with the VPN on.
- Record the baseline first. With the VPN disconnected, run the test and note which resolver and ISP it shows. That is your normal, no-VPN result.
- Connect the VPN fully. Pick a server, wait for the app to report the tunnel is active, and turn split tunneling off while you diagnose.
- Run the standard test, then the extended test. The standard test makes a handful of lookups; the extended test makes more, which catches resolvers that rotate between several egress addresses.
- Repeat in each browser and on each device. Leaks are often browser-specific, so a clean result in one browser does not clear the others.
How to read the results
Compare every listed resolver owner with the organization that should be handling your DNS. Use this guide to interpret what you see.
| Connection state | Observed resolver | Likely meaning |
|---|---|---|
| No VPN | Your ISP | Usually normal, unless you chose another resolver |
| VPN connected | Your ISP | Likely DNS leak — fix the VPN or browser DNS setting |
| VPN connected | Only the VPN provider's servers | Expected result |
| VPN connected | A public resolver such as Google or Cloudflare | Something chose its own DNS — usually the browser's secure DNS |
| Any state | Several resolver IPs | Not necessarily a leak — large DNS services use pools of resolvers |
A VPN's DNS may show up under the name of its hosting or infrastructure partner; that is still fine if your provider documents it. Ownership databases often name the hosting network rather than the consumer-facing brand, so check the resolver against your VPN provider's documentation before concluding anything.
Test 2: check from the command line
Akamai runs a diagnostic name that answers with the address of the recursive resolver that asked for it. On macOS or Linux, run dig +short TXT whoami.ds.akahelp.net. On Windows, run nslookup -type=TXT whoami.ds.akahelp.net. The answer contains an ns field: the address of the recursive resolver that sent the query.
Google offers the same idea with dig +short TXT o-o.myaddr.l.google.com. If the ns address belongs to your ISP while the VPN is connected, the command line confirms the leak independently of any browser setting. If it belongs to the VPN provider, the operating system side is clean and the problem, if the browser test still shows a leak, is in the browser.
You can also check what your connection currently reveals with the free what-is-my-ip tool.
Test the related WebRTC path separately with the WebRTC leak test.
How do you fix a DNS leak?
Work through the causes in order, retesting after each change. Flush your local DNS cache between tests so stale answers do not confuse the result.
- Let the VPN manage DNS. Turn on the client's DNS leak protection, sometimes called DNS leak protection or part of the kill switch, reconnect, and retest. This alone fixes most leaks.
- Align the browser's secure DNS. In Chrome, check Settings, Privacy and security, Security, Use secure DNS. The default tries to upgrade your existing resolver to DoH, which can quietly bypass the VPN's DNS. In Firefox, check Settings, Privacy and Security, DNS over HTTPS. For leak testing, set the browser to use the system resolver, or turn its secure DNS off, so the browser follows the VPN.
- Turn off split tunneling while diagnosing. If the leak disappears, re-enable it only for the apps you meant to exclude, and accept that their DNS leaves the tunnel.
- Windows: stop the OS from using several resolvers at once. Windows can send a lookup to every active interface and use whichever answers first. Disable it in Group Policy: Computer Configuration, Administrative Templates, Network, DNS Client, Turn off smart multi-homed name resolution, Enabled.
- macOS: check the resolver order. Run
scutil --dnsand confirm the VPN's resolver is listed first and applies to all domains. - Linux: check what the resolver actually is. The command
resolvectl statusshows the DNS servers in use per link; the VPN's link should be the one answering. - Mind IPv6. If your VPN does not support IPv6, enable its IPv6 leak protection, or disable IPv6 on the physical adapter while the VPN is connected.
- Set DNS at the router if you want every device on the network to use the same resolver by default, but remember the browser and VPN settings above can still override it.
Retest after every change, and retest again after reconnecting: a configuration that is clean on one network can leak on another, especially on hotel or office Wi-Fi that intercepts DNS. If a public resolver you configured never appears at all, the network may be intercepting port 53 and redirecting your queries.
When is it not a leak?
Not every unexpected resolver is a problem. Knowing the exceptions saves you from chasing a clean setup.
- You configured a public resolver on purpose. If you set 1.1.1.1 or 8.8.8.8 yourself, seeing it is expected. The question is whether the queries reach it through the tunnel.
- Your network requires its own resolver. Corporate and school networks often force DNS through their resolver by policy. That is by design, not a leak, and the VPN cannot override it without breaking access.
- The operator name looks unfamiliar. Check the resolver against your VPN provider's documentation before concluding anything, as above.
- Several resolver IPs appear. Large DNS services operate pools of resolvers in multiple locations, and the test may see more than one.
DNS over HTTPS, defined in RFC 8484, encrypts lookups so they cannot be read on the network. That is a real privacy gain, but it does not by itself guarantee the lookups go to the resolver you intended. Encryption and routing are separate questions, and a leak test checks the routing.
What a leak test cannot tell you
A leak test only observes which resolver answers. It says nothing about whether your device or connection is otherwise safe, and it is not a substitute for other checks.
- It is not an IP or WebRTC leak test. WebRTC can expose your real IP address to a web page through STUN requests even when DNS is clean. Test those separately.
- It does not detect malware or phishing. A clean DNS result does not mean your device is free of malware or that a site is trustworthy.
- A clean result is a snapshot. Reconnecting, switching networks, or waking from sleep can change the resolver. Test again whenever the setup changes.
For the wider picture, check the domain itself with the free DNS lookup tool to compare what different resolvers return.
Review your domain's DNS security on the DNS and domain security page.
The bottom line
A DNS leak is silent, common and fixable. Your VPN can hide your IP address perfectly while your ISP still sees every domain you look up, because DNS took a different path out.
Test first, with a baseline and a VPN-on result, then work through the fixes one at a time: let the VPN manage DNS, align the browser's secure DNS, and turn off split tunneling while you diagnose. Once the resolver you see is the one you chose, retest whenever your setup changes. You can start that check now with the free DNS lookup tool.
Frequently asked questions
What is a DNS leak?
A DNS leak is when domain-name lookups escape the encrypted VPN tunnel and reach a resolver outside it, usually your ISP's resolver. The VPN still hides your IP address, but the resolver can see which domains you look up.
How do I test for a DNS leak?
Connect your VPN, then run a leak test on a site such as DNSLeakTest, browserleaks.com or ipleak.net. Run it first without the VPN as a baseline, then again with the VPN on, and compare which resolver appears.
Is a DNS leak dangerous?
It undermines the privacy a VPN is supposed to provide. A leak does not expose the exact page you opened, but the domain list alone shows which services you use and when, and it can reveal your location through the resolver.
What causes a DNS leak?
Common causes are a VPN client that does not manage DNS, a browser's secure DNS setting bypassing the VPN, split tunneling, IPv6 traffic going around an IPv4-only VPN, multiple active network interfaces, and fallback to a DHCP resolver.
Can a DNS leak happen without a VPN?
Without a VPN there is no tunnel to leak from, so seeing your ISP's resolver is normally expected. A leak is only a problem when you intended the lookups to go through the VPN or another resolver you chose.
Does DNS over HTTPS prevent DNS leaks?
DNS over HTTPS encrypts lookups so they cannot be read on the network, but it can cause a leak if the browser sends them to its own DoH provider instead of the VPN's resolver. For leak testing, set the browser to use the system resolver.
How do I fix a DNS leak on Windows?
Turn on the VPN's DNS leak protection, align the browser's secure DNS setting, turn off split tunneling while diagnosing, and disable smart multi-homed name resolution in Group Policy if Windows queries several interfaces at once.
Sources
The engineers and analysts who build Cysoro's domain scanner, email-authentication checks and free security tools. We test what we write about every day — SPF, DKIM, DMARC, certificates, look-alike domains and phishing — and check each guide against the relevant standards, government guidance and vendor documentation.
Checked against DNS leak test methodology, RFC 8484 on DNS over HTTPS, and Akamai's whoami diagnostic documentation.
How we write and fact-check →