Before your computer connects to example.com, it has to ask a DNS resolver for the IP address. If that question goes to your ISP's resolver in the clear while the actual traffic goes through a VPN or Tor, your ISP still gets a neat list of every domain you visited. That's a DNS leak.

Tor Browser doesn't have this problem in normal use: it hands the hostname to Tor over SOCKS5, and the exit relay does the lookup. Leaks show up when other apps are pushed through Tor badly, for example a program configured with a plain SOCKS4 proxy that resolves names locally first. torsocks and Whonix both exist partly to stop that.

With VPNs, leaks come from operating systems that use multiple resolvers, IPv6 lookups that bypass the tunnel, or "smart" DNS features that query every interface at once. Many VPN apps include DNS leak protection; check that it's on.

Testing is easy. Connect, then visit a DNS leak test site and see whose resolvers show up. If it lists your ISP, you're leaking. Our DNS leaks guide walks through the fixes for each platform.