Guide

How to fix a DNS leak

Most guides tell you to switch DNS providers. That doesn’t fix a leak. It changes who receives the leaked queries.

Two problems, not one

Mixing these up is how people “fix” a leak and stay exposed.

  1. Your queries are going somewhere you didn’t choose. That’s the leak. It’s fixed wherever the diversion happens: your VPN, your operating system, your router, or a device that ignores both.
  2. Whoever answers them sees every domain you visit. That’s true leak or no leak, and it’s fixed by choosing who you trust.

Encrypted DNS helps with the second and softens the first: leaked queries are unreadable to your ISP, and on port 443 or 853 they can’t be silently rerouted. They still go somewhere you didn’t pick, so fix the leak itself.

Part one: stop the leak

On a VPN, the fix is nearly always in the VPN app or the operating system. Without one, it’s the network or the device. Skip ahead if that’s you.

Start with the VPN app

Most clients have a setting called DNS leak protection, Use VPN DNS, or Block outside DNS. Turn it on, and turn on the kill switch so nothing escapes if the tunnel drops. That’s often the whole fix.

Windows

Windows sends each lookup to every network adapter at once and takes the first reply, which is usually your ISP’s. The feature is called smart multi-homed name resolution.

On Pro and Enterprise, open Group Policy and set Turn off smart multi-homed name resolution to Enabled under Computer Configuration → Administrative Templates → Network → DNS Client.

On Home, set DisableSmartNameResolution to 1 under HKLM\SOFTWARE\Policies\Microsoft\Windows NT\DNSClient, then reboot.

macOS

macOS can leak when two interfaces are live, like Wi-Fi and Ethernet, each with its own DNS settings. Turn off the one you’re not using, then check System Settings → Network → your interface → Details → DNS for anything still pinned to your router.

iPhone and iPad

In the VPN’s settings, look for an option to include all networks or route all traffic. If you’ve installed a custom DNS profile under Settings → General → VPN, DNS & Device Management, it overrides your VPN. Remove it while testing.

Android

Private DNS (Settings → Network & internet → Private DNS) runs outside your VPN and can send queries around the tunnel. Set it to Off or Automatic while on a VPN, and turn on Block connections without VPN.

Linux

Run resolvectl status and check the per-link DNS servers. If your physical interface still lists your router while the tunnel is up, the VPN never claimed DNS. Most clients fix that by setting ~. as a routing domain on the tunnel interface so it wins for everything.

If you’re not using a VPN

Work down in this order. The first cause is invisible from the device; the rest aren’t.

Your router

Running the VPN on the router itself? Point its upstream DNS at your VPN provider’s resolver. That’s also the only practical way to cover TVs, consoles and smart-home gear.

Part two: the IPv6 leak nearly everyone misses

Plenty of VPNs only capture IPv4 and let IPv6 walk straight out of the tunnel. If your network has IPv6 and your VPN doesn’t, you can leak all day while every IPv4 test says you’re clean.

Part three: choose who answers

With the leak closed, one question is left: who holds the list of every domain you visit? By default, your internet provider.

On a VPN, its own resolver is usually right. Otherwise any of these are solid. No ranking, no affiliate links.

Your VPN’s own resolverYour VPN provider

The right answer while the VPN is on. The queries never leave the tunnel.

Quad99.9.9.9Swiss non-profit

Blocks domains known to serve malware. No logging of personal data.

Cloudflare1.1.1.1Commercial

Consistently among the fastest. Publishes independent audits of its retention claims.

NextDNSCommercial

You choose the filtering and whether anything is logged at all. Generous free tier.

Control DCommercial

Per-device profiles and granular rules. Paid beyond a limited free tier.

Use the encrypted form of whichever you pick, DNS over HTTPS or DNS over TLS, so the queries can’t be read or rewritten in transit. All of them support both. To keep the list in your house, run your own resolver and point it upstream over an encrypted connection.

Then test again

Reconnect your VPN if you use one and run the test again. Every resolver listed should be one you chose: your VPN’s or the provider you configured. If you don’t recognize one, queries are still being diverted. Back to part one.

Test my DNS