What is a DNS leak?
A VPN hides your traffic, but every website visit starts with a DNS lookup, and if that lookup goes to the wrong resolver, your VPN is hiding less than you think. Here is what a DNS leak is, how to see one in under a minute, and how to close it.
In this guide
A DNS leak happens when your device sends domain-name lookups to your internet provider's resolver instead of through your VPN. Your traffic is still encrypted, but the ISP (or anyone on the path) gets a running list of every site you visit, and websites can place you by the resolver that fetched their records. It is caused by operating-system fallbacks, IPv6, browser DNS settings or router configuration, and each has a specific fix.
DNS leaks in plain words
DNS, the Domain Name System, turns a name like example.com into an address like 203.0.113.10 that your device can actually connect to. Your device does not do that translation itself; it asks a resolver, and the resolver it asks is whichever one the network handed out when you connected. On home broadband that is your ISP's resolver.
A VPN is supposed to take over that job. When the tunnel comes up, the VPN app points your device at its own resolver, reachable only inside the tunnel, so your lookups travel encrypted along with everything else. A DNS leak is any lookup that escapes that arrangement and reaches the ISP's resolver, or some other resolver outside the tunnel, carrying your real address as its source.
The consequence is specific. The resolver sees a timestamped list of every domain you look up: not the pages, not the content, but bank.example, clinic.example, dating.example, one after another, tied to your subscriber account. And because websites can see which resolver fetched their records, a site can often work out your real country or city even though your traffic arrives from the VPN's address.
Run a DNS leak test
The DNS leak test works by making your browser look up a set of unique hostnames under a DNS zone that we control. Whatever resolvers ask our nameserver for those names are, by definition, the resolvers handling your lookups. The test lists them with their owner and location.
- Run it once with the VPN off and note the resolver owner. It will usually be your ISP, or a public resolver you set yourself.
- Turn the VPN on and run it again.
- Compare. With the VPN on, every resolver should belong to the VPN provider, or sit in the VPN server's country, and your ISP must not appear.
To see what your system resolver is set to right now, the what is my DNS server page shows it without the full test.
Test it now
CheckingRunning against our own test servers. Nothing is stored.
Open the DNS leak testReading the results
| Resolvers listed with the VPN on | Verdict |
|---|---|
| Only resolvers owned by the VPN provider | No leak. |
| Your ISP's resolver, alone or alongside the VPN's | Leak. Lookups are escaping the tunnel. |
| A public resolver (Cloudflare, Google, Quad9) in your real country | Partial leak. Your ISP is not seeing lookups, but the resolver sees your real address, and sites can place you by its location. |
| A public resolver in the VPN server's country | Usually fine: many VPNs forward to a public resolver from inside the tunnel. |
| An IPv6 resolver when the VPN only assigned you IPv4 | IPv6 leak. Your native IPv6 connection is carrying the lookups. |
| More than one resolver in different networks | Your OS is querying several interfaces at once; see the Windows note below. |
One ISP resolver among several VPN resolvers is still a leak. Resolvers are queried in parallel or by turns, and over a day the ISP will see most of your lookups.
Common causes
- The VPN does not change the system resolver. Typical with manually configured VPNs (built-in OS clients, WireGuard configs without a
DNSline, OpenVPN profiles withoutdhcp-option DNS). The tunnel carries traffic; lookups keep going where they always went. - Windows asks every interface. Windows can send a lookup over more than one network interface at the same time and use the first answer. With a VPN up, that means the physical adapter's ISP resolver gets a copy. Microsoft calls the behavior Smart Multi-Homed Name Resolution.
- IPv6 is not tunneled. If your ISP provides IPv6 and the VPN only handles IPv4, the IPv6 resolver your ISP advertised remains reachable and the OS happily uses it. The IPv6 test shows whether you have native IPv6.
- The browser has its own DNS. Chrome, Edge and Firefox can send lookups over DNS over HTTPS to a resolver of their own, bypassing whatever the VPN set. That is private from the ISP, but the DoH provider sees your real address if the browser's connection to it is not inside the tunnel.
- The router is the resolver. Many home routers hand out their own address as the DNS server and forward to the ISP. A VPN running on a single device may still have the router as a secondary resolver.
- The tunnel dropped. Without a kill switch, the gap between a disconnect and a reconnect sends everything, lookups included, over the bare connection.
How to fix a DNS leak
In the VPN app
Start here; it fixes most cases. Look for DNS leak protection, Use VPN DNS only, Block DNS outside the tunnel or similar, and turn on the kill switch. Enable IPv6 leak protection if offered, or set the app to block IPv6 while connected. Re-run the test.
Windows 11
- Open Settings > Network & internet, select Wi-Fi or Ethernet, then your connection, and choose Hardware properties.
- Next to DNS server assignment, click Edit, switch Automatic (DHCP) to Manual, turn on IPv4 and enter a resolver you trust, such as
1.1.1.1and1.0.0.1. Set DNS over HTTPS to On (automatic template) so the lookups are encrypted even if they escape the tunnel. Do the same under IPv6, or disable IPv6 on the adapter if your VPN cannot carry it. - On Pro and Enterprise editions, open the Group Policy Editor and under Computer Configuration > Administrative Templates > Network > DNS Client set Turn off smart multi-homed name resolution to Enabled. This stops Windows from querying the physical adapter while the tunnel is up.
macOS
- Open System Settings > Network, select Wi-Fi (or Ethernet) and click Details….
- Open the DNS tab, click + under DNS Servers and add your chosen resolver addresses. Remove the ISP's entries, click OK.
- Prefer a VPN app that installs its own DNS configuration; macOS will otherwise fall back to the network's resolvers for some lookups.
Android
Use the system-wide Private DNS setting (Settings > Network & internet > Private DNS on Pixel; Settings > Connections > More connection settings > Private DNS on Samsung) and enter a DNS-over-TLS hostname such as one.one.one.one. Lookups are then encrypted to that provider on every network, VPN or not. Our Private DNS guide covers providers and troubleshooting.
Router
If the VPN runs on the router, set the router's WAN DNS servers to the VPN provider's resolvers rather than "obtain automatically from ISP". If the VPN runs on devices, set the router's DNS to a public resolver so that any lookup reaching the router does not reach the ISP's logs.
Browser DNS over HTTPS
Either turn it off so the VPN's resolver is used (Chrome and Edge: Settings > Privacy and security > Security > Use secure DNS; Firefox: Settings > Privacy & Security > DNS over HTTPS), or point it at a provider you trust and accept that the provider, not the VPN, answers your lookups.
Retest, then run the full VPN test
After each change, run the DNS leak test again until no resolver outside the VPN appears. Then run the VPN leak test, which checks DNS, WebRTC and IPv6 together. The same misconfigurations that leak DNS, an unhandled IPv6 connection above all, usually leak the other two as well, and a VPN that passes all three is one you can trust on public Wi-Fi. The DNS lookup tool is useful afterwards for checking that your chosen resolver answers correctly and quickly for the sites you use.
Questions
How do I check if I have a DNS leak?
Connect your VPN and run a DNS leak test, which makes your browser look up unique names and reports which resolvers asked for them. If every resolver belongs to your VPN provider, there is no leak. If your ISP's resolver appears, or a resolver in your real country shows up when the VPN server is elsewhere, lookups are escaping the tunnel. Run the test with the VPN off first so you recognize your ISP's resolver.
How bad is a DNS leak?
It undoes the privacy a VPN is meant to give you, without touching the encryption. Your ISP, or whoever runs the leaking resolver, gets a timestamped list of every domain you visit tied to your account, and websites can infer your real location from the resolver that fetched their records. Page contents, logins and messages stay encrypted. For someone using a VPN to hide which sites they visit, that is the whole point lost.
How do I fix a DNS leak?
Turn on the VPN app's DNS leak protection and kill switch, and its IPv6 protection if it has one. If the app lacks those options, set the system resolver manually to a trusted public resolver, disable IPv6 on the adapter while the VPN cannot carry it, and on Windows enable the policy that turns off smart multi-homed name resolution. Make browser DNS-over-HTTPS settings deliberate. Re-test after every change.
Is changing DNS to 1.1.1.1 safe?
Yes, for most people. Cloudflare's resolver supports encrypted DNS, truncates client IP addresses and deletes its query logs within 25 hours, and Cloudflare has had those commitments audited. Using it means Cloudflare, rather than your ISP, sees your lookups; it is a change of who you trust, not a removal of trust. It does not hide your IP from websites, so it is a complement to a VPN, not a substitute.
What can cause a DNS issue?
Separate from leaks, lookups fail or slow down when the configured resolver is unreachable (a VPN resolver after the tunnel drops), when a router's forwarder hangs, when a stale cached answer points at an address that has changed, or when a resolver blocks a domain on purpose. Flushing the local DNS cache, switching to a public resolver and comparing answers with a DNS lookup tool isolates which of these is happening.
What does DNS stand for?
Domain Name System. It is the distributed directory that maps human-readable names such as example.com to the IP addresses computers use, and back again. Your device sends each lookup to a resolver, which walks the hierarchy of root, top-level and authoritative nameservers to find the answer and caches it. Because every connection starts with a lookup, whoever runs your resolver sees a complete record of where you go.