Account

Articles and comparisons

DNS leak: what it is and why it matters with a VPN

A DNS leak happens when your DNS lookups go to your internet provider while the VPN is on, instead of through the tunnel. Before your browser can open a site, it asks a DNS resolver for the site address. The VPN still hides your traffic, but your provider sees which sites you look up.

Check your browser right now

Checking your browser…

Run the test: DNS leak test →

How DNS works, briefly

Your device sends each name, such as example.com, to a resolver, usually the one your provider or router hands out. The resolver finds the address and remembers your question. Whoever runs the resolver can see a list of the sites you visit, and site operators can see which resolver asked on your behalf.

How a DNS leak test works

A test page makes your browser look up several random names that have never been used, on a domain whose name server the tester controls. That name server logs which resolvers asked. If they belong to your provider and not to your VPN, your DNS leaks. Unlike most browser checks, a DNS leak test therefore needs a name server of its own.

Why VPNs leak DNS

Encrypted DNS in browsers

Firefox, Chrome and other browsers can use DNS over HTTPS (DoH). Lookups then go encrypted to the DoH provider you chose instead of your internet provider. That hides them from your internet provider, but the DoH provider is still a third party, and it is not the same as sending DNS through the VPN. A leak test will show the DoH provider's resolvers.

How to fix a leak

Why sites care

For anti-fraud systems, the resolver is one more location signal. A VPN connection from one country with DNS resolvers of a provider in another fits the picture of someone hiding their location. Like any other signal, it is a hint and not proof.

Does SpoofLens test DNS leaks?

Yes. The browser check asks your browser to open a random one-time name in a zone that our own name server answers for. That shows us which DNS server actually asked, so we learn its network and country and compare them with your IP address. If the DNS server belongs to a provider in a different country from your IP, you will see the finding "DNS requests bypass the VPN". Public DNS services such as Google, Cloudflare or Quad9 do not count as a leak, because using them is your choice.

Frequently asked questions

Is a DNS leak dangerous?
It shows your internet provider which sites you look up, and a site that runs a DNS test sees your provider's DNS server, which hints at where you really are. Your traffic itself still goes through the VPN.
Does private browsing prevent DNS leaks?
No. Private or incognito mode only stops the browser from keeping history and cookies on your device.
Can encrypted DNS replace a VPN?
No. It hides lookups from your provider, but the sites you visit still see your IP address and traffic.

Read next