# How to fix a DNS leak in your browser

> A browser DNS leak is either your own machine resolving names or a proxy IP using a resolver abroad. How to tell the two apart, and the fix for each.

Source: https://mosaicbrowser.com/guides/fix-dns-leak-in-browser

## How to fix a DNS leak in your browser

To fix a DNS leak in a browser, first see whose resolver a leak test shows. Your own ISP means the browser resolves names itself, so use an HTTP, HTTPS or SOCKS5 proxy, not SOCKS4; a resolver in a third country belongs to the proxy IP, and only another pool or seller changes it.

![Which resolver answered, and whose it is, beside a screenshot: a proxy check result in Mosaic: latency, IP address, ISP, HTTPS support and reputation](https://mosaicbrowser.com/covers/fix-dns-leak-in-browser.webp)

A DNS leak test cannot see your browser. It sees the recursive resolver that came asking its own name server for a one-time hostname, and it reports that resolver's address, ISP and country. So the first job is to read who that resolver belongs to. There are three possible answers, and only one of them is a fault in the browser.

## What a DNS leak test is really telling you

| The test shows | Whose resolver it is | Is the browser at fault? |
| --- | --- | --- |
| Your own ISP, in your own country | your computer's, so the browser resolved the name itself before it used the proxy | yes, and it is fixable |
| A resolver in the same country as your proxy IP | the proxy server's | no, this is the clean result |
| A resolver in a third country, often Google or Cloudflare | the proxy server's, but it sits somewhere else | no, it is a property of the IP |

The first row is the classic leak. Every site you open is looked up through your own ISP's resolver, so the ISP sees the list, and a test page sees a resolver in a country your IP says you are not in.

The third row is the one people spend days on. We did. Whoer took 30% off one of our profiles for "DNS different", and stock Chrome on the same machine did not lose the points, so it looked like our bug. It turned out the stock run had no proxy. Next we sent plain `curl` through an IP Oasis US session, with no browser involved at all. The resolver came back as Google, first in Germany and then in the Netherlands, while the IP itself was a Verizon address in the United States. The same lookup straight from our build Mac named our real Austrian ISP. So the browser's names were going through the proxy, and the proxy server was resolving them through Google in Europe. The full Whoer readout, check by check, is in [Whoer's score explained](https://mosaicbrowser.com/guides/whoer-net-score-explained).

Mosaic is a desktop app

Email yourself the link and open it on your computer.

[How it works: Checked before every launch](https://mosaicbrowser.com/features/proxy-check-before-launch)

## Where a browser resolves names when it has a proxy

Chromium's own documentation for its proxy code says exactly where name resolution happens for each kind of proxy:

| Proxy scheme | Who resolves the hostname in Chrome |
| --- | --- |
| HTTP | the proxy: "name resolution is always deferred to the proxy" |
| HTTPS | the proxy, as with HTTP, and the hostname travels inside TLS |
| SOCKS5 | the proxy: Chrome "will always use proxy side resolution" |
| SOCKS4 | your computer: resolution "is always done client side" |

That table is most of the fix. If your browser shows your own ISP on a leak test, look first at a SOCKS4 proxy, and then at anything that decides routing by looking names up locally, such as a PAC script that calls `dnsResolve()` or an extension that sets its own rules. The same document notes that Firefox lets you choose with `network.proxy.socks_remote_dns`, while Chrome has no such option. ([Chromium's proxy notes](https://chromium.googlesource.com/chromium/src/+/HEAD/net/docs/proxy.md) cover each scheme in full.)

## How to fix a DNS leak in your browser, step by step

1. Run an extended test, not the standard one. DNS Leak Test's extended test sends about three dozen lookups, so it catches a resolver that only answers some of them. BrowserLeaks' DNS page lists every resolver with its ISP and country.
2. Run it from the browser and profile you actually use, with the proxy you actually use. A test from a different browser tells you about that browser.
3. Read the country of every resolver against the country of your public IP, which the same page usually shows at the top.
4. If you see your own ISP, change the proxy scheme to HTTP, HTTPS or SOCKS5, remove any PAC script or proxy extension that resolves names locally, and test again.
5. If you see a third country, test the proxy without a browser. Send `curl -L` through it to a resolver echo such as `http://edns.ip-api.com/json`. If curl gets the same foreign resolver, the IP chose it and no browser setting will change it. Ask the seller for another pool or region, or try another seller.
6. Test more than once, on a pinned session. On one profile, in one launch, we reloaded Whoer six times and read 100, 100, 100, 100, 35 and 30. The drops came when the residential session rotated, which means a new proxy server and a new resolver.

Step 5 is the one most guides skip, and it is the one that tells you whether to keep changing browser settings or to stop.

![A proxy check in Mosaic: IP address, ISP, HTTPS through the proxy and the IP's score](https://mosaicbrowser.com/shots/proxy-check.png)
*A proxy check reads the IP, its ISP and its resolver*

## Why it matters for more than privacy

The privacy problem is the first row: your ISP's resolver sees every name you look up. The consistency problem is the third. Scanners such as Whoer and [BrowserScan](https://mosaicbrowser.com/guides/browserscan-explained) compare the resolver's country with the IP's country, and a mismatch costs points even though nothing about you leaked. A profile whose IP says Frankfurt and whose resolver says Amsterdam is not unusual for a residential pool, but it is one more thing that does not agree.

## How Mosaic handles DNS

Each profile's editor has a Privacy tab, and its first switch is **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 if any code path tried to resolve a name on your computer it would fail rather than leak. The browser already hands names to the proxy for HTTP, HTTPS and SOCKS5. The rule is there so that a path we have not thought of fails closed.

The resolver the IP uses is measured instead of guessed. When Mosaic checks a proxy, it asks `edns.ip-api.com` through that proxy which resolver did the lookup, and shows the answer on a DNS row beside the IP. If the resolver sits in a different country from the IP, the row says the resolver is in a different country from the IP, and the check turns amber, with a note that another pool or seller is the only fix. You see that before the profile opens, because Mosaic [checks the proxy before every launch](https://mosaicbrowser.com/features/proxy-check-before-launch). How to read the rest of a proxy check is in [how to check a proxy before you use it](https://mosaicbrowser.com/guides/how-to-check-a-proxy-before-you-use-it).

1. Open the profile, go to the Privacy tab and leave **Resolve DNS through the proxy only** on.
2. On the Proxies page, check the proxy and read its DNS row against the IP's country.
3. To see it from inside the profile, open the row menu, choose **Check detectors**, and on the **Leaks** tab pick BrowserLeaks · DNS or DNS Leak Test (extended).

![A Mosaic profile fingerprint: GPU, screen, fonts, timezone and language matched to the proxy's IP](https://mosaicbrowser.com/shots/fingerprint-detail.png)
*Timezone, language and location are drawn for the IP the proxy check measured*

If you are choosing a seller, a [residential proxy](https://mosaicbrowser.com/glossary/residential-proxy) with country targeting at least lets you pick the IP's country, and the proxy check then tells you whether its resolver agrees.

## Sources

1. [Chromium: Proxy support in Chrome (net/docs/proxy.md)](https://chromium.googlesource.com/chromium/src/+/HEAD/net/docs/proxy.md), read November 3, 2026

## Questions

### Does a VPN or proxy stop DNS leaks on its own?

Not always. In Chrome an HTTP, HTTPS or SOCKS5 proxy takes the hostname and resolves it at the proxy side, but a SOCKS4 proxy makes the browser resolve names itself, and a proxy IP can use a resolver in a different country from its own address.

### Is a DNS server in another country a leak?

It is not your address leaking, but it is a mismatch a site can score. Whoer counts a DNS server whose country differs from the IP's as its largest single deduction. It belongs to the proxy server, so a browser setting cannot move it.

### Why does my DNS leak test change between runs?

Usually because the IP changed. A residential session that rotates gives you a different proxy server, and each node uses its own resolver. Pin a sticky session before you compare runs.

### Does Chrome's Secure DNS setting fix a DNS leak behind a proxy?

When an HTTP, HTTPS or SOCKS5 proxy is set, Chrome hands the hostname to the proxy, so the proxy side decides how it is resolved. Secure DNS settings do not change which resolver the proxy server uses.

## Related

[How to check a proxy before you use it](https://mosaicbrowser.com/guides/how-to-check-a-proxy-before-you-use-it): Check that a proxy answers and connects, where its IP really is, whether the address is residential or blocklisted, and that the browser stays behind it.

[Whoer.net score explained: where the points go](https://mosaicbrowser.com/guides/whoer-net-score-explained): Whoer.net takes points off its anonymity score for each mismatch with your IP: timezone, language, WebRTC, DNS. A DNS mismatch costs the most, 30 points.

[BrowserScan explained: the authenticity score and its sections](https://mosaicbrowser.com/guides/browserscan-explained): BrowserScan takes points off 100% when your IP, clock, language or hardware disagree. One of our profiles read 90 to 100% with nothing changed.

[Check the proxy before launching a browser profile, every time](https://mosaicbrowser.com/features/proxy-check-before-launch): Mosaic checks the proxy before launching a browser profile: it must answer and carry HTTPS. If it does not, nothing opens and the error names the proxy.

[Residential proxy: an IP on a home internet connection](https://mosaicbrowser.com/glossary/residential-proxy): A residential proxy sends your traffic out through an address an ISP assigned to a home connection, so sites see a household rather than a data center.

[Match browser timezone to proxy IPs, automatically](https://mosaicbrowser.com/features/exit-matching): No need to match browser timezone to proxy by hand: Mosaic sets each profile's timezone, language and location from the measured IP, before every launch.



[Chrome keeps asking for proxy username and password](https://mosaicbrowser.com/guides/chrome-keeps-asking-for-proxy-username-and-password): Chrome keeps asking for the proxy username and password when the proxy answers 407 and no valid login reaches it. Check the login or allowlist your IP.

## Run this guide on your own accounts

Every Mosaic profile is a fingerprint, a proxy IP and a cookie jar that agree with each other, kept on your computer. Free covers 3 profiles with no card, and Pro is $25 a month for any number of them.

Mosaic is a desktop app

Email yourself the link and open it on your computer.
