5 min read
A DNS leak happens when your DNS requests escape the private path you thought they were using. You may be running a VPN, a privacy DNS service, or a secure network, yet your DNS queries still go to your internet provider, and the provider can see every domain you look up. The connection itself may be encrypted, but the address book lookup happens in the open.
This guide explains what is a DNS leak and how to test for it. You will learn how DNS lookups work, why they leak around a VPN, how to run a leak test, and how to fix a leak once you find one.

How DNS Lookups Work
When you type a website name into a browser, your device asks a DNS server to translate that name into an IP address. The DNS server works like a phone book: you give it a name, and it returns the number your device needs to connect.
The lookup happens before the encrypted connection to the website starts, which is why it can leak information even when the website itself uses HTTPS. The provider running the DNS server learns the domain you visited, the time of the visit, and your IP address.
DNS over HTTPS and DNS over TLS encrypt the lookup itself, so a network observer cannot read the domain from the traffic. Those protocols protect the lookup on the wire, but they do not change which server answers the lookup. If the answering server logs your queries, encryption alone does not give you privacy.
Why DNS Leaks Happen Around a VPN
A VPN is supposed to route all your traffic, including DNS lookups, through its encrypted tunnel. A DNS leak happens when some lookups bypass the tunnel and go to your provider or to another server outside the VPN.
Leaks often come from the operating system keeping its old DNS setting. Windows, macOS, and Android each manage DNS in their own way, and a VPN app may not override every path. IPv6 is a common escape route: if the VPN handles IPv4 only, IPv6 DNS lookups can travel outside the tunnel.
Another cause is a VPN disconnect. When the tunnel drops, the device falls back to the normal connection, and DNS lookups go straight to the provider until the VPN reconnects. A VPN with a kill switch stops all traffic during that gap, which also stops the DNS leak.
How to Run a DNS Leak Test
A DNS leak test is a website that shows which DNS servers answered your lookups. Connect to your VPN, open a leak test site in your browser, and run the standard test. The site returns a list of DNS servers and the provider that owns each one.
If the list shows your internet provider, your router maker, or a server in your home country that does not belong to your VPN, you have a leak. Write down the leaking servers and the provider names, since that detail tells you where the leak comes from.
Run the test twice: once with the VPN connected and once with it disconnected, and compare the two lists. The disconnected list shows your normal DNS path, which gives you a baseline. Also run the extended test if the site offers one, since it sends more lookups and catches leaks that a short test misses.
How to Fix a DNS Leak
The most reliable fix is to set the DNS servers manually on your device, inside the VPN or in the system settings, so the device has no reason to ask the provider. Choose a DNS service you trust, enter its addresses in the network settings, and flush the DNS cache so the old entries clear.
If your VPN has a DNS leak protection setting, turn it on. That setting forces all lookups through the tunnel and blocks any lookup that tries to escape. If your VPN has an option to disable IPv6, use it while you test, since an IPv6 leak is a frequent cause.
Check the browser too. If the browser uses its own DNS over HTTPS, it may bypass the system DNS entirely. Turn the browser DNS setting off, or set it to the same DNS service you chose for the system, so the browser and the system agree.
How to Keep DNS Private Over Time
Leak protection is not a one-time fix, because updates can reset network settings. A system update, a VPN app update, or a new network connection can restore the provider DNS and reopen the leak. Run a leak test after every major update, and after you connect to a new network for the first time.
Use encrypted DNS on top of the VPN when you can. DNS over HTTPS or DNS over TLS hides the lookup from observers on the local network, and a DNS service with a clear no-logs policy reduces what the server itself records. Encryption and a trusted server together cover both the wire and the endpoint.
Finally, remember that DNS privacy is only one layer. A DNS test that shows no leak does not mean your browsing is invisible. Cookies, account logins, and browser fingerprinting still identify you to the sites you visit. Treat DNS privacy as part of a larger setup, and keep the rest of your privacy habits in place alongside it.
Before you go, take a look below: more internet guides, hand-picked to follow this one.
