Before your browser loads a site it asks a DNS server to turn the name into an address. With a working VPN those questions travel inside the tunnel to the VPN's resolver. When they go to your internet provider's resolver instead, your provider can see which sites you look up even though the pages themselves are encrypted. That is a DNS leak, and your IP can look perfectly hidden while it happens. For the background, read do VPNs leak DNS; this guide focuses on fixing it.
Confirm you have a leak
Connect your VPN and run the DNS leak test. If the resolvers shown belong to your own provider (not your VPN or a resolver you chose), requests are bypassing the tunnel. If the result is inconclusive, run it again. The test reports what it could observe and does not guarantee the absence of other leaks.
Why it happens
- The operating system chooses the resolver. Windows can send queries over every network adapter and use the fastest answer, which may come from your provider.
- The VPN does not set its own DNS. Some manual or router-based setups tunnel traffic but leave DNS settings alone.
- Encrypted DNS in the browser. Browser "secure DNS" can send lookups to a third-party resolver, bypassing the VPN's.
- IPv6 DNS. Your network may advertise an IPv6 resolver the VPN does not handle.
Fixes by device
All devices: use the VPN's own settings first
Turn on "DNS leak protection" or similar and update the app. Try a different protocol. Retest.
Windows
Use the VPN's official app rather than the built-in connection when possible, as it can lock down DNS. Check that no manual DNS servers are set on your adapters, or set them to the VPN's resolver. Disable IPv6 on the adapter if the VPN does not support it.
macOS
Open System Settings, Network, your connection, DNS, and remove any servers you added by hand so the VPN's can apply. Use the provider's app.
Android
Check Private DNS (in network settings). If set to a provider such as automatic, it may override the VPN. Set it to Off while using the VPN, or to the same resolver the VPN uses.
iPhone and iPad
Remove any DNS profile or custom DNS under your Wi-Fi network's settings, and use the VPN's app, which manages DNS for the tunnel.
Browser
If secure DNS is on in your browser, set it to follow the system resolver or turn it off while the VPN is on.
Retest
Run the DNS leak test again, then the full privacy scan. If you want to choose a resolver yourself, see how to change your DNS server.
A clean DNS test means no leak was observed in this test. It does not make your browsing anonymous.