Before a browser can open example.com it has to turn the name into an address, and it asks a DNS resolver to do that. On a home connection the resolver usually belongs to your internet provider. When you add a VPN or a proxy, the idea is that the lookups go through it too. A DNS leak is the case where they do not: the pages travel through the VPN or proxy, while the list of names goes to your provider in the clear.

Why a DNS leak matters

There are two separate problems. The first is privacy. Whoever runs the resolver sees every name your browser looks up, and the time it did, which for most people is the provider the VPN was meant to keep out.

The second is consistency. A page can find out which resolver looked up its own name, by serving a one-time hostname and asking its name server who came asking. A visitor whose IP sits in Frankfurt and whose resolver belongs to a broadband company in another country is two places at once, and scanners compare those two countries.

How a DNS leak test works

A leak test page makes your browser look up a handful of random subdomains that exist nowhere else. Its own name server logs which resolvers asked, and the page shows you their addresses, owners and countries. The test cannot see your browser's settings; it only sees who asked. DNS Leak Test's explainer describes the standard and extended versions; the extended one sends more lookups and catches a resolver that answers only some of them.

A result reads one of three ways:

The resolver belongs toWhat it means
Your own internet providerA leak: names were resolved on your computer
A network in your IP's countryClean: the proxy server resolved the names
A third country, often a public resolverNot a leak, but the IP's own choice, and a mismatch scanners notice

A profile does not open until its proxy has answeredIn Mosaic: Checked before every launch. No profile opens behind a proxy that has not answered. Free covers 3 profiles with no card, and Pro is $25 a month for any number of them.

How it works: Checked before every launch

Where a browser resolves names behind a proxy

Chromium's proxy notes settle most of it. With an HTTP or HTTPS proxy, "name resolution is always deferred to the proxy". With SOCKS5, Chrome "will always use proxy side resolution". With SOCKS4, resolution "is always done client side", which is the classic browser leak. A PAC script that calls dnsResolve(), or an extension that decides routing by looking names up, can also resolve on your machine. A system VPN is a different story again, because there the operating system decides which resolver it uses.

The third row of the table is the one that wastes days. In our own testing, Whoer took points off a profile for "DNS different". We then sent plain curl through the same residential proxy, with no browser at all, and the resolver came back as Google in Germany and then in the Netherlands while the IP was a US address. Nothing leaked; the proxy server resolved names through Europe. The step-by-step version, including that curl test, is in how to fix a DNS leak in your browser.

How Mosaic handles DNS

Each profile's Privacy tab has Resolve DNS through the proxy only, on by default. With a proxy attached, the engine starts with a --host-resolver-rules map that sends every hostname to ~NOTFOUND, so a code path that tried to resolve a name on your computer would fail rather than leak. The browser's names already go to the proxy for HTTP, HTTPS and SOCKS5; the rule is there for the path nobody thought of.

The IP's own resolver is measured rather than assumed. When Mosaic checks a proxy before launch, it asks edns.ip-api.com through that proxy which resolver did the lookup and shows it on a DNS row beside the IP. If the two are in different countries, the row says the resolver is in a different country from the IP, because the only fix there is another pool or seller.

A proxy check result in Mosaic: latency, IP address, ISP, HTTPS through the proxy and reputation
A proxy check reads the IP and the resolver it uses

A DNS leak and a WebRTC leak are tested separately in Mosaic too. The proxy check reads the resolver; the leak test, run from inside the profile's own page, reads the IP address, the WebRTC candidates and the timezone.