← Glossary

What Is a DNS Leak Test?

A DNS leak test reveals which resolver endpoints handle test lookups. Comparing them with the intended configuration can flag unexpected resolution, but the result alone cannot establish encryption or the full route to a resolver.

Updated:

A DNS leak test observes which recursive resolver endpoints handle specially generated lookups. It helps check whether a browser is using the expected DNS service, for example while a VPN is connected. An unexpected ISP resolver deserves investigation, but its owner alone does not prove that traffic bypassed the tunnel. The test observes queries reaching an authoritative server; it does not trace the complete path or inspect unrelated browsing activity.

What a DNS Leak Test Measures

The thing being measured is the resolver path. A browser hands a hostname to a stub resolver, which forwards the question to a configured recursive resolver, which in turn walks the DNS hierarchy and finally asks the authoritative servers for the zone. Authoritative servers see the recursive resolver's address, not the user's. RFC 9076, the IETF's analysis of DNS privacy, notes that this hides the user from the authoritative side, although incompletely. A DNS leak test exploits exactly that property: by owning the authoritative servers for a test domain, the operator can record which recursive resolvers contact them on the user's behalf.

What counts as a DNS resolver leak depends on what the user intended. For a VPN user it means queries reaching a resolver outside the tunnel, typically the ISP's. For an encrypted-DNS setup, an unexpected resolver may indicate fallback, but the result alone cannot show whether the client-to-resolver connection was encrypted. For a corporate device it might mean internal names being sent to a public resolver. The test reports resolver addresses; whether those addresses constitute a leak is a comparison against expectation, not a verdict the tool can make on its own.

How Test Requests Reveal Resolvers

The mechanism relies on cache avoidance. The test page instructs the browser to load a handful of resources from hostnames that have never existed before, such as random labels under the test operator's domain. Fresh labels are intended to avoid ordinary cached answers and cause a lookup to reach the operator's authoritative servers. Filtering, local overrides or synthesised responses can prevent some test queries from arriving, so successful observations matter more than the number of requested lookups. Each arriving query carries the address of the resolver that sent it. The page then correlates those server-side observations with the browser session that triggered them, using the unique labels as the join key, and displays the resolver addresses, usually with their network owner and approximate region.

Several resolvers often appear. Large public and ISP resolvers are distributed systems with many egress addresses, so repeated queries from one user can surface a handful of them. An operating system with more than one active interface may send queries over several of them, or fall back from one resolver to another when the first is slow. Browsers add their own layer: Firefox's Trusted Recursive Resolver, for example, has a mode that tries DNS over HTTPS first and falls back to the native resolver when the encrypted lookup fails, and a stricter mode that never falls back. RFC 9076 observes that application-specific resolvers are often configured without the user's awareness. A test sees the sum of these behaviours during a few seconds, which is both its strength and its limit.

Interpreting Results and False Alarms

Start by comparing resolver ownership with the intended configuration. Expected provider endpoints are consistent with that setup; unexpected endpoints warrant checking browser DNS settings, VPN routing and fallback policy. A resolver's egress address does not reveal how the device reached it. The same public resolver could be contacted through a tunnel or outside it, and a resolver service can forward queries onward.

An unfamiliar resolver is not by itself a leak. Many VPN services forward to public resolvers rather than running their own, so the result shows the public resolver's egress address rather than a VPN address. A user who set a public resolver in their operating system will see that resolver with or without a VPN. ISP resolvers frequently answer from addresses in a different range from the one configured on the device. RFC 9076 adds a less obvious caveat: choosing a small or unusual resolver can itself make a user easier to track across networks, so a familiar-looking result is not automatically the private one.

A displayed location is an estimate associated with the resolver's egress address, not a measurement of the visitor's position. EDNS Client Subnet is another possible disclosure: it can carry part of the client's network prefix to authoritative servers. RFC 7871 recommends privacy limits, but implementations and prefix lengths vary. Even without that option, unique test labels let the operator associate DNS observations with the browser session that requested them.

When and Why to Run One

DNS leak testing is most useful at moments of change: after installing or reconfiguring a VPN, after switching the system or browser to an encrypted resolver, when joining an unfamiliar network, and when an application is suspected of using its own resolver. A VPN DNS test run before and after connecting, with the two result sets compared, is more informative than a single run, because the baseline shows which resolvers the device uses when nothing is tunnelled. Network administrators use the same technique to confirm that managed devices honour resolver policy, and privacy-conscious users run it periodically after updates or configuration changes that could affect resolver behaviour.

DNS Test Limitations

The DNS test limitations fall into four groups. First, scope: the test observes the browser that loaded the page during a short window. Other applications, background services and other browsers may resolve names differently, and nothing in a clean browser result speaks for them. Second, timing: a configuration that behaves correctly when idle may fall back to a different resolver under load, after a network change, or when the preferred resolver is briefly unreachable. RFC 9076 notes that pressure on an encrypted resolver can push clients to fall back to unencrypted services. Third, the test says nothing about trust in the resolver it finds. A resolver on the expected path sees the query names it receives and the connecting address, which may be a VPN exit or another intermediary, and encrypted transport between device and resolver does not reduce what the resolver itself learns.

Fourth, DNS is one channel among several. A passing DNS result is independent of whether the public IP address seen by websites is the VPN's, and independent of WebRTC. RFC 8828 explains that WebRTC's connectivity checks can discover the ISP's public address alongside the VPN's in a split-tunnel configuration, and that browser gathering policies and the chosen interfaces determine which additional addresses can be disclosed. A device can therefore pass a DNS leak test and still expose its real address through a WebRTC candidate. Checking each channel separately, and distinguishing the measurement from the protective configuration that is the subject of DNS leak protection, is what makes the result meaningful.

Frequently asked questions

Does an unfamiliar resolver prove a leak?

No. A leak is a mismatch between the intended path and the observed one. Many VPN providers forward to third-party public resolvers, ISP resolvers answer from unexpected address ranges, and a public resolver set in the operating system appears regardless of VPN state. Identify the network owner before concluding anything.

Can a DNS leak test reveal an exact location?

No. Results usually attach a geographic estimate to the resolver's outgoing address, which may be far from the visitor. EDNS Client Subnet can disclose a client-network prefix in some deployments, but neither that prefix nor the resolver location reliably identifies a person's exact physical position.

Can DNS pass while WebRTC still exposes an address?

Yes. The two channels are independent. WebRTC gathers connection candidates through its own checks, and in split-tunnel VPN setups it can disclose the ISP's public address alongside the VPN's. A clean DNS result says nothing about WebRTC, so each needs to be checked separately.

Why does the test show several resolver addresses?

Large resolver services answer from many egress addresses, operating systems can query more than one interface or fall back between resolvers, and browsers may use their own encrypted resolver with native fallback. Multiple addresses from one expected provider are normal; addresses from an unexpected network are the signal to investigate.

Is a DNS leak test the same as DNS leak protection?

No. A test observes resolver activity for a limited set of lookups. Protection comes from routing, filtering and fallback policies that enforce the intended behaviour. An expected result is useful evidence, but it does not by itself establish the route, encryption state or behaviour of every application on the device.