How-to guide

What is a DNS leak, and how do you test your VPN for one?

Two pipes leave your device: one for websites, one for DNS. A leak is when the DNS pipe skips the VPN.

VPN users, IT admins and privacy-minded people4 min readUpdated
Short answer

A DNS leak is when your device sends its DNS lookups to your internet provider instead of through your VPN, so the provider still sees every site you visit. A DNS leak test makes your browser look up made-up names that only the test’s DNS server can answer, then shows which resolvers asked. If any belong to your provider rather than your VPN, you have a leak.

Two pipes out of your device

Think of your connection as two pipes. One carries the websites you visit. The other carries DNS lookups, the questions your device asks to find each website’s address before it can connect.

A VPN is meant to route both pipes through its own network. A DNS leak is when the DNS pipe takes a shortcut straight to your internet provider. The provider can’t read the pages, but the lookups alone list every site you visit, with times.

Why DNS leaks happen

  • The VPN app doesn’t set its own DNS server, so the device keeps using the one from your router or provider.
  • Windows sends lookups to every network adapter at once (Smart multi-homed name resolution) and uses the fastest answer, which is often your provider’s.
  • IPv6 lookups bypass a VPN that only handles IPv4.
  • The browser’s own Secure DNS (DNS over HTTPS) sends lookups to Cloudflare, Google or another service, whatever the VPN does.

How to fix a DNS leak

  • Turn on the VPN app’s DNS leak protection, or the “use VPN DNS” setting.
  • On Windows, turn off Smart multi-homed name resolution (group policy) and make sure the VPN adapter has the VPN’s DNS server.
  • If your VPN doesn’t handle IPv6, turn IPv6 off on the device while connected, or use a VPN that does.
  • In the browser, set Secure DNS to your VPN’s resolver, or turn it off so the browser uses the device’s DNS.
  • Run the test again. Every resolver should now be in your VPN’s network.
Tip: A result showing Cloudflare or Google DNS isn’t a leak if you chose that service. It means they see your lookups instead of your provider.

What a DNS leak test can’t see

The test checks the DNS your browser uses. Apps with their own DNS settings, or a device on the same network, may use something else. It sees which resolver asked, never which sites you visit, and our server forgets the test names after 10 minutes.

Questions people ask

Can my internet provider see my DNS on a VPN?
Only if DNS leaks. With the VPN handling DNS, your provider sees encrypted traffic to the VPN and nothing about the sites you look up.
Is a DNS leak dangerous?
It reveals your browsing history by domain to whoever runs the resolver, and it can show your real location or network to sites that use your resolver’s address.
Does a DNS leak show my IP address?
Not directly. It shows the resolver’s address, which usually belongs to your provider, so it reveals your provider and rough location. Some resolvers also pass on part of your own address (EDNS Client Subnet).
How often should I run a DNS leak test?
After installing or updating a VPN, changing its settings, or moving to a new network such as hotel or office Wi-Fi.

Sources and further reading

Written by the middle.network team, who build and run these tools. Last checked 2026-11-21.