All articles
Privacy Basics
2026-04-055 min read

What a DNS Leak Is and How to Test for One

What a DNS leak is, why it happens even when your IP address changes, how to run a test that actually means something, and how to read the result.

What a DNS leak actually is

A DNS leak happens when your device sends domain lookups outside the VPN tunnel, usually to your ISP resolver or another local network resolver.

That means a site may not see your real IP, but another party can still see which domains you are trying to reach.

The lookup and the traffic travel separately. Your browser asks a resolver to turn a name into an address, and only then opens a connection. The VPN can carry the second part perfectly while the first part goes somewhere else entirely, and nothing on your screen distinguishes the two cases.

Why leaks happen

Leaks are usually caused by local resolver overrides, client defaults that request DNS without enforcing it, or traffic leaving the device during the seconds when the VPN is reconnecting.

The common thread is that your config asks for a resolver and the operating system decides whether to honour the request. Those are two different things, and most leaks live in the gap between them.

  • The VPN client requests DNS servers but nothing applies them
  • The operating system prefers a resolver on another interface
  • A browser or security tool resolves names on its own
  • There is no kill switch covering the reconnect window

What a leak reveals, and what it does not

A leaked lookup exposes the name you asked for and the time you asked for it. It does not expose the contents of the page, and it does not undo the encryption on the tunnel itself.

That sounds like a small loss until you consider what a list of domains looks like over a week. The resolver operator sees a browsing history without needing to read a single packet of traffic.

It also cuts the other way. A leak does not mean your VPN is broken or that your traffic is unencrypted. It means one specific class of request took a different route, and it is fixable on its own.

How to test properly

Establish a baseline before you connect. Note which resolvers answer for you on the bare network, so you can recognise them later.

Flush the DNS cache next. A cached answer is served without asking anyone, so a test run against a warm cache can pass while the live configuration is wrong.

Connect the VPN, confirm your public IP address changed, and run an extended DNS leak test rather than the standard one. The extended form issues many lookups against distinct subdomains, which reveals a resolver that only handles part of your traffic. On the command line, dig or nslookup will name the server that answered, which is the same evidence without the browser in the way.

Then repeat the whole test after a reconnect, after a sleep and wake cycle, and after moving between networks. A test run once on a settled connection is the easiest test to pass and the least informative.

How to read the result

A leak is any resolver you did not intend to be used. That is a broader definition than the usual one, and it is the useful one. Your own ISP appearing in the list is the obvious case, but a resolver belonging to your router or a security product counts equally.

A large public resolver in the list is not automatically a leak. If your VPN config points at one deliberately, seeing it is the correct result. If you did not choose it, something else did, and that is worth finding.

Location is the most common false alarm. Public resolvers are anycast, so the address that answers you can geolocate a long way from your VPN exit without a single query leaving the tunnel. Judge the result by which operator answered, not by which country the test names.

One more rule. If several resolvers are listed and any single one belongs to your local network, that is a leak, regardless of how correct the others look.

Three leaks people confuse

Leak is used loosely enough that two people can agree they have one and be describing different failures. Separating them first saves the time otherwise spent fixing the wrong thing.

  • A DNS leak exposes the names you look up while the tunnel still carries your traffic
  • An IP leak sends the traffic itself outside the tunnel and exposes your address
  • An IPv6 leak is an IP leak on a protocol your tunnel never carried in the first place
  • A WebRTC leak exposes local addresses from inside the browser without touching DNS

Where to fix what you found

Fixing a leak is per-operating-system work, and it lives on its own page rather than here.

That guide covers setting DNS inside a WireGuard or OpenVPN tunnel, and the resolver stack on Windows, macOS, and Linux including systemd-resolved. It also covers the overrides worth removing, and how to pair the configuration with a kill switch for the reconnect window.

DNS leak protection setupKill switch setup for Windows, macOS and Linux

Do not forget the browser layer

Browsers resolve names themselves when secure DNS or DNS over HTTPS is enabled, which bypasses the system resolver and therefore the tunnel configuration you just corrected.

This produces the confusing case where the operating system tests clean and the browser still leaks, or the reverse. Test both, and treat a browser setting as a separate resolver rather than a display preference.

WebRTC is the other browser path worth checking. It can expose local network addresses even when DNS is behaving, which is a different leak with a different remedy.

Quick answers

Can a DNS leak happen even if my IP changed?
Yes. Your public IP can show the VPN while DNS requests still go to your ISP or another resolver outside the tunnel. The address change proves the traffic route was applied, and it proves nothing about the resolver.
How do I know if my VPN is leaking?
Flush the DNS cache, connect, confirm the public IP address changed, then run an extended leak test and check which operator answered. Repeat it after a reconnect and after a sleep cycle, because that is when leaks appear and a settled connection is the easiest case to pass.
Does a kill switch stop DNS leaks?
Only during an outage. A firewall-level kill switch blocks lookups because it blocks everything, so it covers the reconnect window. It does nothing about a leak that happens while the tunnel is up and healthy, which is the more common failure.
Is it a leak if the test shows a public resolver instead of my VPN provider?
Not if you chose it. A config that points at a public resolver is working correctly when that resolver answers. It is a leak when a resolver appears that you did not configure, because something on the device is making that decision for you.
Why does the leak test show a resolver in a different country from my VPN server?
Large resolvers are anycast, so the answering address can geolocate far from your exit without any query leaving the tunnel. Read the result by operator rather than by country, and treat a mismatch in location alone as normal.
Put it into practice

A 24-hour PulseVPN trial takes about a minute to set up and asks for no card, no email, and no name.

Start free trial

Related reading