To run a DNS leak test, connect your VPN, open your VPN provider's connection check (or any DNS leak test page) in a fresh browser window, and look at which DNS servers answer. If any of them belong to your internet provider or to a resolver you set yourself, instead of the VPN provider, you have a DNS leak.
The fix is almost always a setting on your own device. The sections below show how to read the result, how to confirm it from the command line, and how to fix each common cause.
How to run a DNS leak test
- Test without the VPN first. Note the DNS servers or the provider name the test reports. This is your baseline, usually your internet provider or the public resolver you chose.
- Connect the VPN. Wait until the app says it is connected.
- Open a new private or incognito window. This avoids cached results and most extensions.
- Run the test again and compare it with the baseline.
Mullvad's connection check shows how a result is usually reported. A green result means no DNS leaks. A yellow result means the check itself failed, and you should retry in a new private window or another browser. A red result means leaking DNS servers were found. Other test sites use their own wording, but the question is the same: do the servers listed belong to the VPN?
How to read the result
| What the test lists | Meaning |
|---|---|
| Only the VPN provider's servers | No leak. Your lookups go through the tunnel to the VPN's resolvers. |
| Your internet provider's servers | Leak. The operating system or a browser is sending lookups outside the tunnel. |
A public resolver you chose (for example 1.1.1.1) | Counted as a leak by providers such as Mullvad, whose definition is "a DNS server that does not belong to Mullvad". Whether it matters depends on what you want to hide. A public resolver still sees every name you look up, and the VPN no longer hides that. |
| A mix of both | Leak. Some lookups use the tunnel and others do not, often because of IPv6 or a browser setting. |
Note that "leak" is defined relative to the VPN you use. If you do not run a VPN, your resolver is simply your resolver. Read how DNS works if the terms resolver and recursive lookup are new to you.
Check your DNS servers from the command line
A web test depends on JavaScript and on the page being reachable. You can also look at what your system is configured to use. In Windows Command Prompt:
nslookup example.com
Example output (addresses are placeholders):
Server: dns.vpn-provider.example
Address: 10.64.0.1
Non-authoritative answer:
Name: example.com
Addresses: 203.0.113.10
The Server and Address lines show which DNS server answered. Microsoft's documentation states that if you omit the second argument, nslookup uses the default DNS name server. With the VPN connected, that default should be the VPN's resolver. If it shows your router's address or your provider's resolver, the system is not using the VPN's DNS.
To query a specific server instead of the default, add it as the second argument:
nslookup example.com 1.1.1.1
In PowerShell, Resolve-DnsName does the same job. By default it queries the interface DNS servers, and -Server overrides that:
Resolve-DnsName -Name example.com -DnsOnly
Resolve-DnsName -Name example.com -DnsOnly -Server 1.1.1.1
-DnsOnly restricts the query to the DNS protocol, so LLMNR and NetBIOS queries are not issued. These commands show what the operating system resolver is configured to use. They do not see lookups a browser makes through its own secure DNS, which is a separate cause covered next.
Common causes and how to fix them
These causes and fixes follow Mullvad's DNS leak help page. The setting names in other VPN apps differ, but the causes are the same.
A custom DNS server in the VPN app
Many VPN apps let you enter your own DNS server. When you do, lookups go to that server and not to the VPN's. In the Mullvad app, leak protection applies unless "Use custom DNS server" is enabled, so turn that setting off. In another app, look for a custom DNS or DNS override option and clear it.
Browser secure DNS (DNS over HTTPS)
A browser can send its lookups to a DNS over HTTPS provider and ignore the system and VPN settings. In Chromium-based browsers the option is called "Secure DNS", and Mullvad advises turning it off. In Firefox, set "Enable secure DNS" to Off. On Android, turn off secure DNS in Chrome or Brave. The trade-off is covered in DNS over HTTPS explained: encrypted DNS hides lookups from your network, but it sends them to the resolver the browser chose.
Windows 11 encrypted DNS
Windows itself can use DNS over HTTPS and DNS over TLS. Mullvad's instructions for Windows 11 are to open an elevated Command Prompt and run:
netsh dns add global doh=no
netsh dns add global dot=no
Verify the change with:
netsh dns show global
If you set a DNS server for a network adapter yourself, that is another route for a leak. See how to change the DNS server in Windows to check and reset the adapter settings.
Browser extensions
Extensions that change DNS, such as CIRA Canadian Shield, can send lookups elsewhere. Disable them and retest.
Antivirus, firewalls and other software
Some security software intercepts DNS. Mullvad lists these examples: turn off Avast's Real Site and Web Guard, or AVG's Fake Website Shield; F-Secure may cause leaks to Amazon servers and should be uninstalled; uninstall Portmaster. On macOS, turn off the DNS Encryption feature in Little Snitch.
IPv6 on Linux
If the test lists an IPv6 DNS address while you are on a VPN, Mullvad's advice is to enable IPv6 in the Mullvad app or disable IPv6 in Linux. The point is that lookups should not go out over an IPv6 path the VPN does not cover.
Routers
If the VPN runs on a router, the fix lives in the router's configuration. Use the troubleshooting section of your provider's router guide.
After you apply a fix
- Disconnect and reconnect the VPN.
- Close the browser fully, then open a new private window.
- Run the test again and compare it with your baseline.
- Repeat the
nslookupcheck. If the default server is now the VPN's, the system side is fixed.
If the cached answer for a name seems stale after you change servers, clear the local cache as described in how to flush the DNS cache.
If the test still shows a leak
Change one thing at a time and retest, so you know which setting mattered. Test in a second browser. If the leak shows in every browser but disappears when you disable a security product, that product is rewriting DNS. If the test page reports that it failed (the yellow result in Mullvad's check), that is not a pass: the check did not complete, so try a private window or a different browser before drawing a conclusion.
A DNS leak test also does not check everything. It does not report whether your real IP address is exposed, and it does not cover every application on the machine. A program that does its own lookups, like a browser with built-in secure DNS, can behave differently from the rest of the system, which is why testing from the browser you actually use matters.
Frequently asked questions
- What does a DNS leak test actually show?
- It shows which DNS servers answered the lookups your browser made. With a VPN on, those servers should belong to the VPN provider. If the list contains your internet provider or a public resolver you configured yourself, your lookups are bypassing the VPN's DNS.
- Is a DNS leak the same as an IP leak?
- No. An IP leak exposes your real address to the sites you visit. A DNS leak exposes the names of the sites you look up to a DNS server outside the VPN. You can have one without the other, so check both.
- Does a leak mean the VPN is broken?
- Not usually. The common causes are settings on your own device: a browser with its own secure DNS, Windows DNS over HTTPS, a custom DNS server entered in the VPN app, or security software that rewrites DNS. Fixing that setting normally ends the leak.
- Should I run a DNS leak test without a VPN?
- It works, but the result is not a leak. You will see your normal resolver, which is expected. The test is only meaningful as a comparison: run it once with the VPN off and once with it on, and the list of servers should change.