What Is a DNS Leak and How to Prevent It

What a DNS leak is, why it happens with VPNs and proxies, how to test for it, and how to stop lookups bypassing the tunnel, including IPv6 and WebRTC mix-ups.

Summarize this post with AI

A 19-minute read, or the key points in about 30 seconds, in the assistant you already use.

Opens in a new tab with the prompt filled in. Nothing passes through this site.

You can hide your IP with a VPN or a proxy and still tell your ISP every site you visit. That happens when DNS lookups skip the tunnel and go to a resolver on your real network. That's a DNS leak.

This guide explains what a DNS leak is, why it shows up with VPNs and proxies, and how to check for one. You'll also see the related leaks people mix up with it, IPv6 and WebRTC, and the settings that close the hole.

I haven't run a new lab of leak tests for this post. The steps come from vendor documentation, including Mullvad's leak guide (updated 20 November 2026) and my earlier explainer of how DNS works.

Some links are affiliate links; they don't change your price.

Editorial cover showing a DNS query slipping through a crack in a VPN tunnel toward an ISP resolver, with VPN, padlock and leak test icons

What is a DNS leak?

A DNS leak happens when your device asks a DNS resolver you didn't intend to use, usually the one on your home or office network, while you think those lookups are going through a VPN or a proxy.

DNS, the Domain Name System, turns a name like lokeshkapoor.com into an IP address before your browser connects. The resolver that answers that question can see every hostname you look up, even if the website itself only sees a VPN or proxy IP.

That is the privacy problem. Your public IP can look hidden, and the log of sites you resolve can still sit with your ISP, your company network, or a "secure DNS" provider you didn't mean to use.

A leak is about the path of the lookup, not about a typo in a record. If the resolver you wanted is the only one that answers, you don't have a DNS leak. If another resolver answers, you do, even if the site still loads.

How does a DNS leak happen with a VPN?

A VPN is supposed to send your traffic, including DNS, through an encrypted tunnel to the VPN server, then out to the internet. A leak starts when some lookups never enter that tunnel.

The usual ways this happens:

  • The operating system sends the same lookup out on more than one network adapter and takes the first answer. Windows has done a version of this, smart multi-homed name resolution, since Windows 8. If a Wi-Fi adapter and a VPN adapter are both up, the ISP resolver can win the race.
  • The VPN only rewrites IPv4 DNS, and your network hands you an IPv6 resolver through router advertisements. Those queries leave on the IPv6 path.
  • The browser or the OS has encrypted DNS turned on, such as Chrome's "Use secure DNS", Firefox's DNS over HTTPS, Windows 11 DNS over HTTPS or DNS over TLS, or Android's Private DNS. Those queries go to the provider you configured, which may not be the VPN's resolver. Mullvad's guide is clear on this: if the test sees any DNS server that isn't Mullvad's, they call it a leak, including Cloudflare's 1.1.1.1 when Firefox DoH is on.
  • A browser extension, antivirus "web shield", or a firewall with DNS hijacking intercepts lookups before they reach the tunnel.
  • Apps start resolving names in the seconds before the tunnel is up, or reuse answers that were cached from before you connected. A kill switch is what addresses that timing gap.
Infographic of a DNS leak on a VPN: the browser asks a recursive resolver, one path stays inside the tunnel, another path slips to the ISP resolver, with callouts for DoH, IPv6 and multi-adapter lookups
A VPN hides the IP on the website side. A leak is a lookup that never entered the tunnel.

Mullvad also notes that their own app is built to stop DNS leaks, unless you turn on "Use custom DNS server" in the app settings. That's the exception, not the default.

If you're choosing a VPN for everyday browsing and publishing work, I keep a dated comparison in best VPNs for bloggers, creators and remote workers. Pick one that documents leak protection and a kill switch, then test it yourself rather than trusting the marketing page.

Do proxies leak DNS the same way?

A proxy is not a VPN. It sits in front of one application, or a set of applications that honour the proxy settings, and it does not automatically capture every lookup on the machine. My proxy vs VPN guide covers that split. The leak pattern is different because of it.

With an HTTP or HTTPS proxy, a well-behaved client often sends the hostname to the proxy, for example in a CONNECT request to port 443. The proxy then resolves the name on its side, so there is no local DNS lookup to leak.

The catch is every app that ignores the proxy. It resolves the name on your network and connects directly. That's a DNS leak and a traffic leak in one.

With a SOCKS5 proxy, the client can resolve the name locally and pass an IP to the proxy, or ask the proxy to resolve it. If remote DNS is off, the lookup stays on your network.

In Firefox this is the "Proxy DNS when using SOCKS v5" option, also exposed as network.proxy.socks_remote_dns. Leave it off and a SOCKS setup will leak DNS even when page traffic goes through the proxy.

System-wide "use a proxy" settings have the same hole as a single-app proxy: only the software that honours the setting is covered.

If the proxy itself won't connect, the login method is the usual suspect; my guide to proxy authentication covers username and password versus IP allowlisting.

So if you use a proxy, don't assume the VPN-style test is enough. Check that the application is actually using remote DNS, then test that the proxy is working, including the resolver list, not just the public IP.

How do I check for a DNS leak?

You check a leak by asking a test page which resolvers it sees, while the VPN or proxy is connected, and comparing that list with the resolvers you expect.

A practical sequence:

  • Step 1: note your real public IP and your ISP resolver while the VPN is off, from a page such as your VPN provider's connection check or a leak test site. Then disconnect the test tab.
  • Step 2: connect the VPN or enable the proxy. Confirm the public IP has changed.
  • Step 3: run the leak test in the same browser you actually use. Mullvad's Connection check, updated 20 November 2026, reports green for no DNS leaks in that browser, yellow if the test couldn't run, and red if it sees leaking DNS servers. Click the red box and look up the IPs if you need to see who they belong to.
  • Step 4: repeat in a private window, and in a second browser. DoH and extensions are often browser-specific, so one green result doesn't clear the others.
  • Step 5: if you use IPv6, confirm whether the test shows an IPv6 resolver or an IPv6 address that belongs to your ISP rather than the VPN.
Infographic of a five-step DNS leak check: note the ISP resolver, connect the VPN or proxy, run the leak test, repeat in another browser, and confirm IPv6 is not bypassing the tunnel
Test in the browser you actually use. DoH and extensions are often per-browser, so one green result is not enough.

Don't treat a single "IP hidden" badge as a leak test. Plenty of pages only show the public IP. You need the resolver list.

And don't paste your leak-test results into a public ticket with your home IP still visible. Redact the address if you send a screenshot to support.

How do I prevent a DNS leak?

Fix the path first, then re-test. The controls that matter, in the order I'd try them:

Use a full-tunnel VPN with leak protection, not a system proxy pretending to be a VPN. The tunnel should carry DNS, and a kill switch should drop traffic if the tunnel falls down.

Turn off competing encrypted DNS while the VPN is up, unless your VPN docs say to use their DoH or DoT endpoint. Mullvad's steps, as of 20 November 2026:

  • Firefox: Settings, Privacy & Security, set Enable secure DNS to Off. Mozilla has enabled DNS over HTTPS with Cloudflare by default in the United States, Canada, Russia and Ukraine, which is enough on its own to fail Mullvad's test.
  • Chrome, Brave and Edge: Settings, Privacy and security (or Privacy, search and services in Edge), Security, turn off Use secure DNS.
  • Android 9 and newer: Network & internet (or Connections on Samsung), Private DNS, Off. Mullvad notes that some Huawei devices can leak if Private DNS isn't pinned to a specific server.
  • Windows 11: disable DNS over HTTPS and DNS over TLS. Mullvad's documented commands, run from an Administrator Command Prompt, are netsh dns add global doh=no and netsh dns add global dot=no, then netsh dns show global to verify.

Disable browser extensions that change DNS. The same goes for antivirus features that rewrite lookups. Mullvad calls out Avast Real Site and Web Guard, AVG Fake Website Shield, F-Secure, and Portmaster as common hijackers. If a leak points at Amazon or another unexpected resolver, uninstall that shield and test again.

If you use SOCKS5, turn on remote DNS in the client. If you use an HTTP proxy, confirm the app sends the hostname to the proxy and isn't resolving it locally.

Handle IPv6 on purpose. Prefer a VPN that routes IPv6 into the tunnel, or one that captures and blocks IPv6 so apps fall back to IPv4 through the tunnel.

If the VPN is IPv4-only and you can't change that, disable IPv6 on the adapter you use with the VPN, then re-test. On Linux, Mullvad suggests enabling IPv6 in the app, or disabling IPv6 on the system, if you see an IPv6 DNS address.

Avoid custom DNS in the VPN app unless you know why you want it. That setting is a documented way to break an otherwise tight leak setup.

After each change, run the leak test again in every browser you use.

What's the difference between a DNS leak, an IPv6 leak and a WebRTC leak?

These three get bundled on test pages, and they are not the same hole.

Leak typeWhat escapesTypical causeWhat actually fixes it
DNS leakThe hostnames you look upLookups leave the tunnel or proxy, often via DoH, IPv6 DNS, or a second adapterForce DNS through the VPN or remote proxy DNS; turn off competing resolvers
IPv6 leakYour real IPv6 address, and often the traffic itselfThe VPN or proxy handles IPv4 only, while the network assigns IPv6Route or block IPv6 in the tunnel; otherwise disable IPv6 on that adapter
WebRTC leakYour public (and sometimes local) IP, discovered by the browserWebRTC STUN/ICE uses UDP and can bypass a proxy, or a split-tunnel VPNFull-tunnel VPN, or a browser policy that forces WebRTC onto the proxy path

A DNS leak reveals your browsing destinations to a resolver. An IPv6 leak can reveal your ISP address to the website, which is a bigger failure than DNS alone.

A WebRTC leak can also reveal your real IP to a web page, even when HTTP traffic goes through a proxy. RFC 8828 describes this directly: when a client is behind a classical application proxy but still has direct internet access, WebRTC's STUN checks can bypass the proxy and expose the public IP.

WebRTC is closer to a fingerprint and IP problem than a DNS problem. If that's the leak you're actually seeing, my guide to reducing browser fingerprint leaks covers WebRTC, canvas and timezone together.

Comparison infographic of DNS, IPv6 and WebRTC leaks with attribute rows for what escapes, who sees it, typical cause and the fix, plus a Best for footer on each column
A leak test page may flag all three. Fix the one you actually have; the settings are not interchangeable.

Frequently asked questions

Does a DNS leak reveal my files or passwords?▾
No. A DNS leak reveals the hostnames your device looks up, which is enough to show where you browse. It does not, by itself, expose the contents of a page, a password, or a file transfer. Those still need a traffic leak, malware, or a site you logged into.
Is using Cloudflare 1.1.1.1 or Google 8.8.8.8 a DNS leak?▾
It depends on what you were trying to hide, and from whom. If you use a VPN whose policy is "only our resolvers", then yes, a test will flag 1.1.1.1 or 8.8.8.8 as a leak. Those providers no longer show your lookups to your ISP, but they do see the queries, and the query still may have left the tunnel. If your only goal was to stop the ISP seeing raw DNS, a well-configured DoH path can be a different trade-off.
Can I keep DNS over HTTPS on with a VPN?▾
Only if the VPN's own documentation says to, and only if DoH goes to the VPN's resolver or travels inside a full tunnel in a way the provider accepts. With Mullvad, browser Secure DNS is a listed cause of a failed leak test, so the documented fix is to turn it off and let the app handle DNS.
Do I still need to test if my VPN app claims leak protection?▾
Yes. Test in the browser you actually use, with your extensions on, and again after an OS or browser update. The app can be doing the right thing while Firefox DoH or Android Private DNS quietly sends queries somewhere else.
Is a WebRTC leak the same as a DNS leak?▾
No. A WebRTC leak can reveal your real IP to a web page through STUN and ICE candidates. A DNS leak reveals hostnames to a resolver. They can appear on the same test page, and a full-tunnel VPN often improves both, but the settings that fix one do not automatically fix the other. More on the browser side is in this guide: [how to reduce fingerprint leaks](/blog/reduce-browser-fingerprint-leaks)
Will fixing a DNS leak stop CAPTCHAs?▾
Not reliably. CAPTCHAs are more often about the IP's reputation, datacenter ranges, or other signals. Hiding DNS from your ISP is a privacy fix, not a popularity fix for the exit IP. If Google keeps challenging a VPN connection, that's a different problem, covered in [why Google shows a CAPTCHA on a VPN](/blog/why-google-shows-captcha-vpn)

A hidden IP with a leaking resolver is a half-closed curtain. Get DNS into the same path as the rest of the traffic, turn off the resolvers that compete with it, and re-test in every browser you use.

If you came here from a proxy setup, finish with a proper proxy test, rather than a public-IP page alone.

Share