ISPing.me

What Is a DNS Leak? How to Detect It

💡 Key takeaways

A DNS leak means your DNS queries bypass the proxy and go through your local ISP, directly exposing your real location. This site tests it with 24 randomly generated domains, checking whether the DNS exit and the IP exit are in the same country — if they differ, it's a leak. The fix is to route DNS through the proxy or switch to encrypted DNS, then re-test to confirm the result turns green.

Your proxy is on and your IP shows as abroad, yet websites still know your real location? Most likely it's a DNS leak. This article explains what it is, how to test for it, and how to fix it.

What Is a DNS Leak?

When you visit a website, your browser first uses DNS to resolve the domain name into an IP address. If you use a proxy or VPN but your DNS requests don't go through the proxy tunnel and instead use your local ISP's DNS, then:

Typical scenarios: a system proxy that only proxies HTTP traffic without handling DNS, or a proxy app whose DNS settings are misconfigured. A DNS leak doesn't mean the proxy failed to connect — it means the proxy only took over half the job: web traffic goes through the proxy while DNS queries stay local. For risk controls, the location where your queries resolve is your location; the exit IP becomes a secondary signal. Different protocols handle DNS takeover differently — for details, see How to Choose Between HTTP, HTTPS, and SOCKS5 Proxy Protocols?.

Why DNS Goes Local: Three Causes

The proxy doesn't handle DNS. A system proxy that only proxies HTTP traffic without handling DNS is the most common cause. The proxy app's DNS settings may be misconfigured, or the client may not have options like “remote DNS” or “DNS routing” enabled, leaving queries local. TUN mode is usually more thorough than a plain system proxy because it captures traffic from the entire device.

ISP hijacking. A common ISP hijacking trick is redirecting DNS queries to the ISP's own servers — even if you specify a different DNS, your requests are still pulled back locally. In that case, changing the DNS address alone isn't enough: you need to encrypt your queries (DoH/DoT) so the ISP can neither see nor alter them.

Mixing multiple DNS sources. The system, the browser, and the proxy client each have their own DNS configured, so queries are split across several DNS setups — some go through the proxy, some stay local — and the result is a partial leak. Mixed leaks are the hardest to catch: a single test may only reveal one path, so you need repeated tests with 24 random domains to see the full picture.

Troubleshoot in this order: first check whether the proxy has taken over DNS, then check for hijacking, and finally check for mixed sources. Before troubleshooting, first confirm the proxy itself is reliable — see How to Choose a Proxy IP: A Guide to Avoiding Pitfalls and Picking Right. For the full verification steps before buying a proxy, see How to Verify a Proxy Before You Buy It.

DNS Leak: Normal vs. Leaking
✅ Normal
Exit IP location
🇭🇰 Hong Kong
DNS resolution location
🇭🇰 Hong Kong
Both match — no leak
⚠️ Leaked
Exit IP location
🇭🇰 Hong Kong
DNS resolution location
🇺🇸 United States
Mismatch — real location exposed

💡 How to test

Visit dnsleaktest.com and run the extended test, comparing the country of your DNS servers with your IP's location.

How to Test: Hands-On with 24 Random Domains

The test principle is straightforward: the browser resolves a batch of randomly generated domains, and we observe which DNS servers actually answer those queries, then compare their country with the country of your current exit IP:

ResultMeaning
All match (green)The DNS exit and the IP exit are in the same country — no leak
All mismatch (red)DNS goes through a different country — a leak exists
Mixed (yellow)Some queries go local, some go through the proxy — a partial leak
Inconsistent results across repeated testsQueries are split across several DNS sources — a sign of mixed leakage; test several times to see the full picture.

Random domains are essential — testing with fixed domains can hit caches and give false results. Every test uses different domains, so ISPs can't pre-cache them to cheat.

One test isn't enough: mixed leaks only show up after repeated testing. After changing your settings, you must re-test to confirm the result turns green.

DNS Leak: Normal vs. Leaking

NormalLeaked
Exit IP locationHong KongHong Kong
DNS resolution locationHong KongUnited States
ResultBoth match — no leakMismatch — real location exposed
Next stepNothing to do, re-test before important actionsFix by cause, then re-test to confirm it turns green.

The table above is the example from the original article: exit IP in Hong Kong and DNS resolution also in Hong Kong means normal; exit IP in Hong Kong but DNS resolution in the United States means a leak. The criterion isn't which country your DNS is in, but whether your DNS and your exit IP are in the same country. If they match, you're clean; if they don't, it's a leak.

This site's test page generates 24 random subdomains for your browser to resolve one by one: if the queries go through the proxy's DNS, the returned DNS exit is in the same country as the IP exit; if they go through your local ISP's DNS, the DNS exit is your real location. Random domains prevent caching — every test uses different domains. To try it yourself, go to DNS Leak Test.

Blocking ISP DNS Hijacking with DoH/DoT

ISPs commonly hijack DNS by redirecting queries to their own servers. The countermeasure is to encrypt your queries: at the system level, change your DNS in the network settings to a provider that supports DoH/DoT (such as Cloudflare or Google's encrypted DNS); at the browser level, enable “Secure DNS” in the settings (Chrome, Firefox, and Edge all offer this); at the router level, changing DNS benefits every device in the household — but first confirm your router firmware supports DoH/DoT, since older routers that don't can only be fixed at the system and browser levels.

After making the change, re-run the DNS leak test to confirm the DNS exit and the IP exit are in the same country. If it still leaks, check whether your proxy client has a “DNS routing” or “remote DNS” option — if it's off, your queries are still local. DoH/DoT solves hijacking, not proxy takeover: encryption blocks hijacked queries, but if your queries never went through the proxy in the first place, encryption can't save them — fix the takeover first, then talk about encryption.

How DNS Leaks Affect Different Scenarios

When using Claude / ChatGPT. Region detection is the most direct impact: a DNS leak points to your real region, and your account may be told the region isn't supported or be asked for extra verification during signup or payment. For the reasoning behind region restrictions, see How Do AI Platforms Enforce Region Restrictions?. Any one of the three leaks (WebRTC, DNS, IPv6) can affect region detection — see Check These Three Things Before Using Claude, which covers all three troubleshooting steps in full.

When browsing through a proxy. A DNS leak directly undermines the proxy's anonymity: you think you're abroad, but websites see your queries resolving at home. Anonymity isn't just about changing your IP — DNS, timezone, and language all need to match as a set; the IP alone isn't enough. For the impact of proxies and Tor exit nodes, see How Do Proxy IPs and Tor Exit Nodes Affect You?.

For everyday browsing without a proxy. Without a proxy, there is no “leak” to speak of — DNS going through your local ISP is the normal state. The leaks discussed here assume you're already using a proxy or VPN and want to hide your real location;

Is Your DNS Leaking? Check it free on ISPing.me right now with IP Lookup →, then run 24 random domains through the DNS leak test for an instant verdict.

What to Do When You Find a Leak: Fix It by Cause

The proxy doesn't handle DNS. Check your proxy app's DNS settings to make sure DNS goes through the proxy tunnel. Prefer TUN mode — it takes over more thoroughly than a plain system proxy. Confirm the client has the “remote DNS” or “DNS routing” option enabled. Re-test after fixing to confirm the result turns green.

ISP hijacking. At the system level, switch to a provider that supports DoH/DoT; at the browser level, enable “Secure DNS”; at the router level, changing DNS benefits the whole household. Re-test after fixing to confirm the DNS exit and the IP exit are in the same country.

Mixing multiple DNS sources. Unify the DNS settings of your system, browser, and proxy client into one setup instead of configuring each separately. After unifying, re-test twice to confirm the result is stable. First take over, then encrypt, then unify — re-test after each step.

After finding a leak, first check your purity score before deciding whether to change IPs: purity score = 100 − risk score, with the risk score in five tiers — below 20 is clean, 70 and above is high risk. This is only a heuristic assessment based on public information, not an official account-ban decision by any platform. Once your DNS is fixed and your purity score is clean, resume important business. If your risk score is still high — see What to Do About a High IP Risk Score? How to Lower It. To read each purity tier, see What IP Purity Score Counts as Clean? How to Read Each Tier.

FAQ

My IP shows as abroad — does a DNS leak still matter?
Yes. Risk controls look at where your DNS resolves: if your DNS is in your home country, your real location is exposed, and a foreign IP won't save you. The exit IP is only one signal — DNS location is the main basis for judging where you are, so one leak exposes it outright.

If only one or two domains leak, does that count as a leak?
Yes. A mixed result (yellow) means a partial leak: some queries still resolve locally, so you need to unify your DNS sources following the fix for mixed setups. One or two leaking still counts: one path goes local, and without unifying, it exposes your real location when it matters.

If I switch to 1.1.1.1, will that definitely stop leaks?
Not necessarily. Changing your DNS address only decides who resolves your queries, not whether the queries go through the proxy. If the proxy doesn't handle DNS, every address you pick will still leak.

If my DNS doesn't leak, is my proxy definitely anonymous?
No. DNS is only one of three leak vectors — WebRTC and IPv6 can also expose your real location, so all three need checking. For the difference between IPv6 and IPv4, see What's the Difference Between IPv6 and IPv4?.

Notes

A test result only reflects the state at the time of testing: if your proxy configuration or network environment changes, the result may change, so re-test before important operations. The criterion for a DNS leak is whether the DNS exit and the IP exit are in the same country — not which country your DNS server is in. For everyday browsing without a proxy, DNS going through your local ISP is the normal state, so there's no need to worry. This article only covers testing and troubleshooting methods and makes no promises about any account outcomes.

Check Whether Your DNS Is Leaking

Open the DNS Leak Test on ISPing.me — 24 random domains tested one by one, with results in real time. Enter an IP on ISPing.me to also see the risk score, purity score, and details of each risk signal.

Check now

Related reading:Check These Three Things Before Using Claude: WebRTC, DNS, and IPv6 LeaksWhat's the Difference Between IPv6 and IPv4? How to Tell Which One You're UsingHow Do Proxy IPs and Tor Exit Nodes Affect You?What Does IP Purity Mean? How to Read the Risk ScoreHow to Choose a Proxy IP: Pitfalls to Avoid and Selection CriteriaWhat to Do About a High IP Risk Score? How to Lower ItWhat to Do When Claude Says Your Region Isn't Supported?

IP Knowledge Base