How to Check for DNS Leaks While Using a VPN
Run the same DNS resolver test before and after connecting to the VPN, using the same device, network, and browser. Compare the resolver addresses and providers. If you still see an unexpected resolver while the VPN is connected, check your browser and VPN DNS settings before deciding whether the queries left the tunnel. If you use a browser extension, follow the Chrome VPN extension test.
What a browser DNS test measures
A DNS test asks your browser to resolve a set of test names and reports the resolvers that query the test domain. A forwarder can pass queries to another resolver, so the reported address may be farther along the chain. An unexpected resolver is a reason to check the setup. Confirming a leak requires evidence that DNS queries that should use the VPN took another path.
A public IP lookup reports the source address used for a browser's web request. See the DNS versus VPN guide for how those settings differ.
Compare DNS resolvers before and after connecting
- On a trusted network, note the browser's Secure DNS settings and any custom DNS settings on the device or in the VPN. If permitted, disconnect the VPN. Open DNS Leak Test, run the Standard test, and record the resolver IPs and provider names as your baseline.
- Connect the VPN and wait for the app to report an active connection. Run a fresh Standard test in the same browser on the same network. Keep your DNS settings the same for this comparison.
- Compare the two sets of results with the DNS configuration you expect for the VPN. Verify your browser's public IP separately using the public IP check steps.
For a managed VPN, keep the required settings and ask your administrator what resolver results to expect. See how the test generates its DNS queries.
To check your system's DNS configuration, follow the Windows DNS verification steps or the macOS DNS verification steps. On an Android phone, see how to compare DNS with the VPN off and on.
How do I check for DNS leaks with a Chrome VPN extension?
Compare both the public IP and the DNS resolvers Chrome reports with the extension off and on. Some extensions use Chrome's proxy settings, so what you see depends on which requests the extension handles.
- Keep the setup the same. Use the same computer, network, Chrome profile, and window mode for both runs. If you test in Incognito, check that the extension can run in Incognito. Keep Chrome's Secure DNS settings fixed. To isolate the extension, leave any separate VPN app off if your settings allow it.
- Record the baseline with the extension off. Use the public IP check steps to record the address the lookup page sees. Then run the Standard test from the DNS comparison steps and note the resolver IPs and providers.
- Turn the extension on and repeat. Check that the extension is active in that window, then load the same IP lookup and run a fresh Standard test. Compare the addresses and provider names with your baseline.
The public IP tells you which address the lookup site sees. The DNS results show which resolvers contacted the test domain. If the public IP changes but the same resolver appears, Chrome may still be using the same Secure DNS provider, or the extension may handle web requests and DNS differently. Check the extension's documented behavior and Chrome's Secure DNS setting before deciding whether any DNS queries bypassed the intended route.
How to interpret the resolver results
- The test shows the expected VPN resolvers. The tested browser lookups match the expected setup. Other apps can use their own DNS settings.
- A resolver from your normal connection still appears. If you expected the VPN to handle these lookups, check your browser's Secure DNS provider, the device's DNS settings, and whether the browser is in the VPN's routing rules. The resolver name alone cannot show how your device reached it.
- You see Google, Cloudflare, or another public resolver. Check whether your browser, device, or VPN is configured to use that service. A public resolver can be reached through a VPN tunnel, and the test result does not say whether a lookup was encrypted.
For example, suppose a test shows your ISP with the VPN off. After you connect, the public IP check shows the expected VPN address and the DNS test shows Cloudflare. If your browser is configured to use Cloudflare for Secure DNS, that setting can explain the resolver name. If permitted, keep the VPN connected, switch the browser to its default DNS setting, and retest before restoring your setting. A different resolver shows that the browser setting affected the result. Confirm the path of the DNS queries separately if you suspect a leak.
For the public IPv6 address websites see on a browser request, follow the IPv6 leak check and result guide.
Check Secure DNS if the results are unclear
In desktop Chrome, open Settings, then Privacy and security and Security. Under Use secure DNS, check whether Chrome has a custom provider. Firefox may turn off DNS over HTTPS under its default protection when it detects a VPN. Check the browser's actual setting for your test. See Chrome's Secure DNS instructions and Firefox DNS over HTTPS settings.
If you changed a setting yourself and are allowed to test it, change one option at a time, rerun the same test, and restore your settings afterward. If the results still conflict with your expected setup, record the resolver addresses, browser DNS setting, and VPN configuration for support. For what this means for visibility on the network, see what your ISP can see with a VPN.