What is a DNS leak?
Every visit to a website starts with a DNS lookup that turns a name like example.com into an IP address. Normally your internet provider's DNS server answers. With a VPN, those lookups should travel through the encrypted tunnel to the VPN's own DNS server.
A DNS leak happens when lookups go to your provider's DNS server outside the tunnel. Websites still see the VPN's IP, but your provider can see every domain you visit, and its DNS filtering or blocking still applies.
How a DNS leak test works
A browser can't report which DNS server it uses. A leak test therefore makes your browser look up several unique, random hostnames on a domain whose DNS server the tester runs. That server records which resolver IP addresses asked for them. If those resolvers belong to your internet provider while your VPN is connected, your DNS is leaking.
The test above does exactly that: it lists each resolver with its provider, network and country, and compares them with the IP websites see. Test names and resolver IPs are deleted after 10 minutes.
Check your DNS server manually
Run one of these commands in Terminal (macOS, Linux) or Command Prompt (Windows, nslookup only). Each asks a public service to tell you the IP address of the DNS resolver that contacted it:
nslookup -type=txt o-o.myaddr.l.google.com
dig +short TXT o-o.myaddr.l.google.com
dig +short whoami.akamai.netHow to read the result
- Look up who owns the returned address with any WHOIS or IP lookup service.
- If it belongs to your internet provider while the VPN is connected, your DNS is leaking.
- If it belongs to your VPN provider, or to a resolver you chose such as Cloudflare (1.1.1.1) or Google (8.8.8.8), there is no leak to your provider.
- These commands test your operating system's DNS. If your browser has "Secure DNS" (DNS over HTTPS) turned on, the browser sends its lookups to that provider instead.
How to fix a DNS leak
- Turn on your VPN app's DNS leak protection (sometimes called "use VPN DNS") and its kill switch.
- Make sure the VPN also handles IPv6, or turn IPv6 off on your network adapter. IPv6 lookups can bypass IPv4-only VPNs.
- Turn on encrypted DNS: "Secure DNS" in Chrome, Edge or Brave, or "DNS over HTTPS" in Firefox, using your VPN's resolver or a provider you trust.
- Check that your router or a manually set network DNS isn't overriding the VPN's settings, then test again.