What DNS-over-HTTPS Actually Hides From Your ISP
Bottom line: DNS-over-HTTPS encrypts the query payload and nothing else that matters at the network edge — your ISP still sees which IP you talk to, which hostname you asked for via TLS SNI, and the resolver you chose still sees every name you look up in plaintext at its end.
I ran a local resolver, pointed a client at it over DoH, and captured both legs with tcpdump. The query contents disappeared from the wire between client and resolver. Everything else — destination IP, port 443, SNI, connection timing, query volume — stayed visible. Below is what I measured, what RFC 8484 actually specifies, and where the privacy claims outrun the protocol.
What DoH actually wraps
RFC 8484 (Hoffman and McManus, October 2018) defines DoH as mapping each DNS query-response pair into an HTTP exchange over HTTPS. That is the whole trick. The DNS wire format message becomes the body of an HTTP request with media type application/dns-message, and it travels inside TLS on port 443.
Two consequences follow directly from that design:
- The DNS message is confidential between client and DoH server, because TLS protects it.
- The HTTP layer adds its own metadata: the request URL path (often
/dns-query), headers, and the TLS handshake in front of it.
RFC 8484 Section 8.1 (“On the Wire”) is explicit that the protocol protects queries from observers on the path between client and server. Section 8.2 (“In the Server”) is equally explicit that the DoH server itself can see everything — it terminates TLS, so it reads every query in the clear. The RFC does not pretend otherwise. The marketing around DoH frequently does.
Compare with DoT, RFC 7858 (May 2016), which wraps DNS in TLS on port 853. DoT hides query contents from the network but makes the DNS traffic trivially identifiable by port. DoH’s advantage is indistinguishability: it uses port 443 and the same protocol as ordinary web traffic, so a passive observer cannot separate DoH from browsing by port alone. That is a real gain. It is also the entire gain.
Setting up the measurement
I used a Debian 12 box as the client, unbound 1.17.1 as a local recursive resolver, and a second host running unbound with DoH enabled as the “remote” resolver, reachable over the LAN. The point is to capture both legs: client-to-resolver (DoH) and resolver-to-authoritative (plain DNS).
Client-side DoH configuration for unbound:
1 | server: |
That is DoT, not DoH, because unbound speaks DoT upstream. For a genuine DoH client I used dnscrypt-proxy 2.1.5 with a DoH stamp pointing at the LAN resolver’s /dns-query endpoint. Either way the capture logic is identical: watch the client’s outbound traffic on port 443.
Capture command, run on the client:
1 | sudo tcpdump -i eth0 -n -s 0 -w doh-capture.pcap 'host 192.0.2.10 and port 443' |
Then generate a controlled set of lookups:
1 | for name in example.com example.org example.net; do |
What the capture shows
Reading the pcap back with tcpdump -r doh-capture.pcap -A and tshark:
| Observable | Plain DNS (port 53) | DoT (port 853) | DoH (port 443) |
|---|---|---|---|
| Query name in payload | Visible | Hidden | Hidden |
| Query type (A/AAAA/MX) | Visible | Hidden | Hidden |
| Destination IP | Visible | Visible | Visible |
| Destination port | 53 | 853 | 443 |
| TLS SNI | N/A | resolver.lan |
resolver.lan |
| Traffic identifiable as DNS by port | Yes | Yes | No |
| Resolver sees query in clear | Yes | Yes | Yes |
| Query volume and timing | Visible | Visible | Visible |
The SNI row is the one people miss. Unless Encrypted Client Hello is in play — and it is not deployed broadly enough to rely on — the TLS handshake carries the resolver’s hostname in the clear. If you use a DoH endpoint identified by a hostname, that hostname is on the wire. If you use one identified only by IP with no SNI, you have removed that leak but made the endpoint trivially fingerprintable by IP.
The destination IP row matters more than it looks. Your ISP does not need to read your DNS query to learn which resolver you use. The five-tuple tells them. And if the resolver is a large public one, the ISP can correlate your IP against that resolver’s known address ranges and infer that you have opted into encrypted DNS — which is itself a signal.
The resolver-side leak
Here is the part that gets glossed over. DoH moves trust; it does not eliminate it. Your queries are now confidential from your ISP but fully visible to whoever runs the DoH endpoint. RFC 8484 Section 8.2 says the server can see the client’s IP address, the query, and the response, and can log all of it. The RFC recommends the server minimize logging and avoid correlating queries with client identity, but that is guidance, not enforcement.
To see this concretely, run a local recursive resolver and watch its logs while a DoH client queries through it. On the resolver host:
1 | sudo tcpdump -i eth0 -n -s 0 -A 'udp port 53 or tcp port 53' |
Every query the DoH client sent arrives at the resolver’s upstream leg as plain DNS toward the authoritative servers, and the resolver’s own query log records the full name. If you operate the resolver, you have the data. If a third party operates it, they have the data. The encryption stopped at their door.
This is why the honest framing is: DoH protects you from your network operator and hands the same information to your resolver operator. Whether that is an improvement depends entirely on which party you distrust less, and on what the resolver operator’s logging policy actually is.
Diagnosing the leaks
The pitfalls are predictable, and each has a specific diagnostic.
SNI leaking the resolver hostname. Confirm with:
1 | tshark -r doh-capture.pcap -Y 'tls.handshake.extensions_server_name' \ |
If a hostname appears, that is on the wire. Mitigation is an IP-literal endpoint or ECH, and ECH requires both client and server support plus DNS HTTPS records.
Application fallback to plain DNS. Browsers and stub resolvers will fall back to port 53 if DoH fails, and that fallback is silent. Watch for it:
1 | sudo tcpdump -i eth0 -n 'port 53' |
Any traffic here while DoH is supposedly active is a leak. The usual cause is a failed TLS handshake, an expired certificate, or a resolver that stopped answering.
Connection reuse masking query volume. DoH over HTTP/2 multiplexes many queries onto one TLS connection (RFC 8484 Section 5.2). An observer cannot count queries from connection count, but they can still measure bytes and timing on the connection. Do not assume multiplexing hides volume.
Resolver logging you did not configure. Check what your resolver actually logs. For unbound, verbosity above 1 writes query names to the log. For a public resolver, you cannot check — you are trusting a policy document.
Client IP correlation at the resolver. Even with query minimization, the resolver sees your source IP alongside every query. If you need to break that link, you need a proxy or a resolver that does not log, and you need to verify the claim rather than accept it.
FAQ
Does DoH hide which websites I visit from my ISP?
No. DoH hides the DNS query, but when you connect to a site, the TLS SNI for that site’s hostname travels in the clear unless ECH is in use, and the destination IP is always visible. DoH removes one signal, not the set.
Is DoH better than DoT for privacy?
They protect the same thing — query contents — from the network. DoH is harder to identify by port because it shares 443 with normal HTTPS. DoT is easier to operate and easier to block deliberately. Neither hides SNI or destination IP.
Can my ISP still tell that I am using DoH?
Usually yes, by destination IP. If you use a well-known public resolver, its address ranges are public. Even with a self-hosted resolver, the traffic pattern on 443 to a single endpoint is distinctive. DoH is not covert.
Does the DoH provider log my queries?
That depends entirely on the provider and you cannot verify it from the client side. RFC 8484 recommends minimizing logging but does not require it. Treat any claim about a third party’s logging as unverified unless you operate the resolver yourself.
What does RFC 8484 say about privacy on the server side?
Section 8.2 states plainly that the DoH server can see the client IP, the query, and the response, and discusses logging and correlation risks. The document is candid that DoH shifts trust to the resolver rather than removing it.
What actually reduces the metadata leak?
Running your own recursive resolver removes the third-party resolver from the trust set. Query name minimization (RFC 9156) reduces what each authoritative server learns. ECH, where deployed, hides SNI. None of these hide destination IP, and none are defaults you get for free by enabling DoH.










