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.
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.
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
Sources and further reading
Written by the middle.network team, who build and run these tools. Last checked 2026-11-21.