A VPN or proxy can hide your IP address and still reveal where you browse, if your DNS queries go somewhere else. That is a DNS leak. This guide explains how it happens, how SOCKS5 and socks5h differ, what operating systems and browsers do on their own, and how to test. One honest note up front: proxychecker.org does not offer a dedicated DNS leak test, and this article says so where it matters.
What a DNS leak is
Before connecting to example.com, your device asks a DNS resolver for its IP address. Normally that resolver belongs to your ISP or router. When you turn on a VPN or proxy, you expect everything, including those lookups, to travel through the tunnel to the provider's resolver. A DNS leak happens when the lookups still go to your ISP's resolver (or another resolver outside the tunnel).
The result: the website sees the proxy's IP, but your ISP can still see the list of domain names you resolve. It does not see page contents over HTTPS, but domain names alone are revealing. A leak can also let a local network redirect or censor lookups.
How leaks happen
- Proxy with local resolution: the client resolves the hostname itself, then sends the IP to the proxy. The proxy never sees the name.
- Split tunneling or misconfigured VPN: DNS requests use the physical network adapter instead of the tunnel.
- OS resolver behavior: some systems send queries to several configured resolvers, or retry on another interface if the first is slow. Behavior differs between Windows, macOS and Linux and depends on the network manager and version, so test your own setup instead of assuming.
- IPv6: a VPN that only tunnels IPv4 may leave IPv6 traffic, including DNS, outside the tunnel.
- Browser-level DNS: browsers can bypass the system resolver, see below.
SOCKS5 vs socks5h: who resolves the name
With SOCKS5, the client can send either an IP address or a hostname in the connection request. Tools expose this as two URL schemes:
| Scheme | DNS resolved by | Leak risk |
|---|---|---|
socks5:// | Your machine, before contacting the proxy | Yes, queries use your normal resolver |
socks5h:// | The proxy server (the "h" means hostname) | No local lookup for the target name |
# local DNS lookup, then the IP goes to the proxy curl -x socks5://203.0.113.10:1080 https://example.com # hostname passed to the proxy, which resolves it curl -x socks5h://203.0.113.10:1080 https://example.com
This h suffix is a convention of curl and libraries built on similar code, such as Python requests with the socks extra. Other clients name the setting differently, for example "proxy DNS when using SOCKS" in Firefox. HTTP proxies using CONNECT normally receive the hostname, so the proxy resolves it. Plain socks5:// is a common source of unintentional leaks; see using a proxy with curl, Python and Node.js for working syntax.
DoH and DoT
DNS over HTTPS (DoH) and DNS over TLS (DoT) encrypt queries between your device and a resolver, so someone on the network path cannot read them. They solve a different problem from leaks. Encryption hides the content from your ISP, but the chosen resolver still sees every name. If a browser silently sends DoH to a third-party resolver while your VPN assumes its own DNS, you have a leak of a different kind: the queries are encrypted but go outside the tunnel to a party you did not pick.
Whether DoH is enabled by default depends on the browser, version and region. Check the setting explicitly rather than relying on defaults.
Browser settings to review
- Firefox: in network settings, enable proxy DNS when using SOCKS, and review the DNS over HTTPS option.
- Chrome and Chromium browsers: they use the operating system's proxy settings by default, and have a "secure DNS" option in privacy and security settings.
- WebRTC: a separate channel that can expose IP addresses. It is not a DNS leak, but it undermines the same goal. Read what a WebRTC leak is and run the WebRTC leak test, which runs in your browser and compares the addresses it finds with the IP we see.
How to test for a DNS leak
Testing a DNS leak needs a service that can tell which resolver reached it. Typically a test page makes your browser look up unique random hostnames under a domain whose name server logs the incoming queries, then shows you the IPs of the resolvers that asked. If those belong to your ISP while your VPN is on, you are leaking.
Our site does not provide this kind of test. The tools we do have cover related parts:
- The DNS lookup queries a domain's records (A, AAAA, MX, NS, TXT, CNAME, SOA, PTR) from our server. It shows what a domain resolves to, but it runs on our server, so it says nothing about which resolver your own device uses.
- The WebRTC leak test checks browser-exposed IP addresses, not DNS.
For a DNS leak test, use a dedicated service from a provider you trust, and run it with your VPN or proxy active.
A manual check from the command line
You can also inspect what your system is configured to use. On Linux with systemd-resolved, resolvectl status lists resolvers per interface. On macOS, scutil --dns shows resolvers in priority order. On Windows, ipconfig /all lists DNS servers per adapter. With the VPN connected, resolvers on the tunnel interface should be the ones in use; resolvers from your home router or ISP appearing first are a warning sign. The output formats vary between versions.
How to fix a leak
- Use
socks5hor the equivalent remote-DNS option wherever you use SOCKS5. - In your VPN client, enable its DNS leak protection or kill switch if offered, and set it to use the provider's DNS.
- Disable IPv6 on the interface, or choose a VPN that tunnels it, if you see IPv6 queries leaving.
- Set browser DNS (DoH) explicitly instead of letting it default.
- Re-run a leak test after each change.
A leak test measures one moment on one setup. Repeat it after network changes, sleep and wake cycles, and VPN reconnects.