privacy / security / vpn
What is a DNS leak, and how do you fix it?
A VPN can encrypt every byte you send and still let your internet provider see every site you open. Here is how that happens, how to check for it, and how to stop it.

On this page
A VPN is supposed to hide which sites you visit from your internet provider. A DNS leak quietly undoes that, even while the VPN shows as connected and your traffic stays encrypted.
You can check your own connection with the NasNet DNS leak test.
What is a DNS leak?
Before your device can open a site, it asks a DNS server for the site's address. A VPN should carry those questions through its tunnel to a server it trusts.
A DNS leak is when the questions go around the tunnel to your internet provider instead. The traffic itself stays encrypted, but your provider still gets a list of every site you open.
How a DNS leak test works
Your browser looks up a batch of random names that exist nowhere else, so no cache can answer them. The server that owns those names records which DNS servers asked, and the test lists them with their provider and country.
On the NasNet test, the names and the lookups are handled by ipleak.net, an independent leak-test service. It sees the addresses of the DNS servers and your IP address, the same as any site you visit. NasNet stores none of it.
Reading the results
Run the test once with your VPN off and note the servers. Then turn the VPN on, open a new tab and run it again. If any server from the first run appears in the second, your DNS is leaking.
A server in a different country from your VPN's address is another warning sign: those lookups are probably not going through the tunnel.
How to fix a DNS leak
Most leaks come from the operating system or browser picking its own DNS server. Work through these in order.
- Turn on the DNS leak protection or kill switch in your VPN app.
- If your VPN covers only IPv4, turn off IPv6 on the device, or DNS can leave over IPv6.
- On Windows, turn off Smart Multi-Homed Name Resolution, which sends lookups to every network adapter at once.
- Check the browser's secure DNS (DNS over HTTPS) setting. It bypasses the VPN's DNS and sends lookups to the provider chosen there.
- On Android, set Private DNS to Off or Automatic while the VPN is on.
- Route the whole home network through the tunnel at the router, as NasNet Panel does, so no device can pick its own DNS.
After each change, open a new tab and run the DNS leak test again.