What Encrypted DNS Actually Hides
Encrypted DNS hides your lookups, not your destination IP or usually the SNI. Who sees what, how ECH fits in, and how to run your own Unbound resolver.

You flipped on "Secure DNS" in your browser settings and felt invisible. That feeling is only partly earned. Encrypted DNS genuinely hides one specific thing from network observers, and it is worth knowing exactly what that thing is, because it is narrower than the marketing implies.
TL;DR
- DNS over HTTPS (DoH) and DNS over TLS (DoT) encrypt the DNS query, the lookup that turns a domain name into an IP address, so your ISP cannot read it in plaintext.
- Neither protocol hides the destination IP address your device connects to next, or (without a separate feature called ECH) the domain name in the TLS handshake's SNI field.
- ECH and encrypted DNS depend on each other: the browser fetches the ECH keys through DNS, so ECH over plaintext DNS leaks the very name it is trying to hide.
- Switching to Cloudflare's or Google's encrypted resolver does not remove an observer; it relocates which company sees every query you make.
- Running your own recursive resolver (Unbound) removes that third party, at the cost of setting it up and keeping it running yourself.
The short version of the gap is a single number.
What encrypted DNS (DoH/DoT) actually hides
Plaintext DNS sends every lookup ("what is the IP for example.com?") across the network in the clear, readable by your ISP, the coffee-shop Wi-Fi operator, or anyone else on the path. DoH wraps that same query inside an HTTPS connection; DoT wraps it inside a dedicated encrypted TLS connection. Both stop a network observer from reading the lookup itself.
| Layer | Plaintext DNS | DoH / DoT | DoH + ECH |
|---|---|---|---|
| DNS query content | Visible | Hidden | Hidden |
| Destination IP address | Visible | Visible | Visible |
| SNI (domain in TLS handshake) | Visible | Visible | Hidden |
| Who can see the query | ISP, any network hop | Only your chosen DNS resolver | Only your chosen DNS resolver |
DoH or DoT: same privacy, different transport
Both protocols hide the same content, so the choice is about where they run and how easily a network can interfere. DoT runs on its own dedicated port, which makes it easy for a network to block outright, and equally easy for an administrator to monitor as "DNS traffic". DoH rides on the ordinary HTTPS port, so it blends in with web traffic and cannot be blocked without collateral damage.
Note
The practical difference is mostly about who controls the setting. DoH is usually switched on per application (a browser), while DoT is usually configured for the whole operating system or router. A browser using DoH can quietly bypass the resolver you configured on your router, which matters if you run network-wide filtering.
Where you turn it on changes what is protected
A browser setting protects only that browser's lookups. Every other app on the machine still uses whatever the operating system or router says. Setting encrypted DNS at the operating-system level covers every app on that device. Setting it on your router, or running a resolver on your network, covers every device behind it, including the TV and the smart plugs that have no settings page at all. For a household, the router or a local resolver is the only place where one change covers everything.
Who sees what: the observer-by-observer matrix
"Visible to a network observer" hides the fact that several different parties sit on the path, and each sees something different. This is the view most explanations skip. Here it is for the four parties that matter, across the common setups.
| Party | Plaintext DNS | DoH/DoT to a public resolver | DoH/DoT + ECH | Own Unbound (recursive) |
|---|---|---|---|---|
| Your ISP / Wi-Fi operator | Domain lookups, destination IP, SNI | Destination IP, SNI | Destination IP only | Destination IP, SNI; the recursive queries to authoritative servers are plaintext unless the upstream supports encryption |
| Your chosen DNS resolver | Sees every lookup (it is your ISP's resolver) | Sees every lookup | Sees every lookup | You are the resolver; authoritative servers see only the pieces they own |
| The destination server | Your IP, the site requested | Your IP, the site requested | Your IP, the site requested | Your IP, the site requested |
| A VPN provider, if you use one | n/a | Sees the destination IP and, without ECH, the SNI | Destination IP only | Same as the ISP column, relocated to the VPN |
Two things stand out. First, the destination server always knows who is talking to it: encrypted DNS is about third parties on the path, never about hiding from the site you are visiting. Second, the own-resolver column is not magic. Recursive resolving removes the company in the middle, but your queries still travel to the root, TLD and authoritative nameservers, and today most of those hops are plaintext. You trade one observer who sees everything for many who each see a fragment.
What it doesn't hide: destination IP and SNI
After the DNS lookup resolves, your device opens a direct connection to the destination server's IP address, and that address is visible to anyone watching the network, encrypted DNS or not. Whether the IP alone gives the site away depends on hosting. APNIC's analysis of web co-location looks at exactly this question: a site on a shared address behind a large CDN is hard to pin down from the IP, while a site on its own address is trivial to identify.
The bigger gap is the TLS handshake. When your browser connects over HTTPS, the very first message, the ClientHello, has historically carried the domain name in plaintext in a field called SNI (Server Name Indication), so the server knows which certificate to present. A network observer watching the handshake can therefore read the domain straight out of that first packet, even when your DNS lookup was fully encrypted.
Warning
If your threat model includes hiding which sites you visit from your ISP or network admin, encrypted DNS alone does not do that job. The destination IP and (usually) the SNI still identify the site. A VPN or Tor, which route the entire connection rather than just the DNS lookup, close that specific gap.
There is also a residue that no DNS or TLS setting touches: the pattern of the traffic. How often you connect, how much data moves and when are all observable, and they can be enough to guess at what you are doing without reading a single name.
ECH: closing the SNI gap, and why it needs encrypted DNS
Encrypted Client Hello (ECH) is the fix for the SNI leak. It is now a finished standard: RFC 9849 specifies ECH itself, and RFC 9848 specifies how a client learns the server's ECH keys through DNS. Mozilla explains in its Firefox ECH FAQ that Firefox supports it and that the feature does not show up in the browser interface, so you have to test for it.
The dependency is the part worth remembering. To use ECH, the browser first needs the public key for the site's ECH configuration, and it gets that from a DNS record. If that lookup travels in plaintext, an observer sees which domain you asked about at the DNS step instead of the TLS step, and ECH protected nothing. So ECH is only useful on top of encrypted DNS, and encrypted DNS leaves a gap that only ECH closes. Neither is a complete answer alone.
Deployment is the other limit. A site must publish ECH keys and its server must support it, and Cloudflare's announcement of ECH shows why most early adoption sits behind a single provider: it turned it on for sites it fronts. Sites that run their own TLS stack on libraries without ECH support cannot offer it yet. In practice, a site you visit supports ECH only if it sits behind a provider that enabled it. For everything else the SNI still leaks. Even where ECH works, it hides the name but not the destination IP, so the co-location point above still applies.
Encrypted DNS and VPNs: leaks and blocking
Two situations quietly undo the setting you thought you had.
DNS leaks. If you use a VPN and your system still sends DNS queries outside the tunnel, your ISP sees every domain you resolve, defeating the point of the VPN. The cause is usually an operating-system setting or an application with its own resolver, such as a browser with built-in DoH pointing elsewhere. A leak test while the VPN is on shows which resolver actually answers.
Blocking and fallback. A network can block the DoT port, or block known public DoH endpoints, to force you back to its own resolver. What happens next depends on the client. In "opportunistic" mode, software falls back to plaintext DNS when the encrypted connection fails, which means the encryption silently disappears on exactly the networks where someone cared enough to interfere. "Strict" mode refuses to resolve instead, which breaks browsing but never leaks. If privacy is the goal, choose strict wherever the software offers it and accept the occasional broken page.
The trust problem: you are just picking who to trust
Turning on DoH to Cloudflare or Google removes your ISP from your DNS queries, but it does not remove a single point of observation. It relocates it. Now Cloudflare or Google sees every domain you look up instead. That might be an improvement if you trust their stated no-logging policies more than your ISP's data practices, but it is a trade, not an elimination.
The only way to remove a third-party DNS observer is to not have one, which means resolving DNS queries yourself, directly against the internet's root and authoritative nameservers, rather than forwarding every query to somebody else's resolver. Public resolvers are free, so unlike the free-freeze-versus-paid-monitoring maths, this is not a cost trade-off. It is purely a question of how many companies you are willing to let see every domain your household looks up.
Running your own recursive resolver: Pi-hole + Unbound
I run Unbound as a recursive resolver on my Proxmox homelab, with Pi-hole in front of it for network-wide ad-blocking. The distinction matters: Pi-hole by default still forwards unblocked queries to an upstream resolver of your choice, often a public one. It is a filter, not a resolver. Unbound replaces that upstream entirely by querying the DNS hierarchy directly, the way a public resolver does internally, except the results only ever reach my own network. The official Pi-hole guide for Unbound walks through the install; the block below is the unbound.conf configuration that puts it in pure recursive mode, with no forwarding upstream at all.
server:
interface: 127.0.0.1@5335
do-ip4: yes
do-udp: yes
do-tcp: yes
prefetch: yes
root-hints: "/var/lib/unbound/root.hints"
Then in Pi-hole's own settings, under DNS, the custom upstream is pointed at that local Unbound instance (127.0.0.1#5335) instead of a public resolver, so every query Pi-hole does not block gets resolved recursively, in-house, rather than forwarded to Cloudflare or Google.
After the first day of cache warm-up, most repeat lookups resolve from Unbound's local cache in single-digit milliseconds, and the queries that do hit the root/authoritative chain land in the 100 to 200 ms range. That is noticeably slower than a public resolver's edge cache on a cold lookup, but nobody sees the query except my own resolver.
Tip
Unbound needs a root.hints file (the list of root DNS servers) refreshed periodically. Most Linux distributions ship a package (dns-root-data on Debian and Ubuntu) that keeps it current, so you do not have to manage it by hand.
What a recursive resolver does not do
Running Unbound does not encrypt the hops from your resolver to the authoritative servers; those mostly remain plaintext, and they leave your ISP's network from your IP address. You have removed the one company that saw everything, and your ISP can still see that those queries happened, just not who inside the household asked. For a household this is a fair deal, but it is a different protection from "everything is encrypted", and it is worth saying so to anyone you set this up for.
Two practical notes from running it. Keep DNSSEC validation on, since a recursive resolver that validates signatures can detect tampered answers, which a forwarding setup delegates to someone else. And if you hit strange resolution failures with validation on, one commonly reported cause is capitalisation randomisation, which some guides, such as this RIPE Labs Pi-hole walkthrough, advise turning off with use-caps-for-id: no.
Test your own setup
Do not trust a toggle; check what your network actually does. Run these from a machine behind the resolver you think you are using.
dig example.com @127.0.0.1 -p 5335
dig example.com @127.0.0.1
dig +dnssec example.com @127.0.0.1 -p 5335 | grep flags
The first command asks your local Unbound directly, bypassing Pi-hole. The second asks through Pi-hole, so you can compare the answers. The third is the DNSSEC check. Look for three things. The first command should answer from your own machine, and a repeat of it should return much faster because the answer is cached. The ad flag in the third command means Unbound validated the signatures. And a browser-level DoH setting should be checked separately, because a browser can ignore all of the above. Finally, run a public DNS leak test in the browser while on your VPN; if it lists your ISP's resolver, the tunnel is leaking.
Which option fits you
| If you want to... | Use | What stays visible |
|---|---|---|
| Stop your ISP reading lookups, with five minutes of effort | DoH/DoT to a reputable public resolver | Destination IP and SNI; the resolver company sees lookups |
| Cover every device in the house | Encrypted DNS at the router or a local resolver | Same as above, for every device |
| Remove any single company logging your lookups | Unbound recursive resolver, as above | Destination IP, SNI, plaintext hops to authoritative servers |
| Hide which sites you visit from the ISP | A VPN or Tor, with DNS inside the tunnel | The VPN provider sees what the ISP used to |
| Hide the domain in the handshake | DoH plus ECH where the site supports it | Destination IP, traffic pattern |
For most people, switching to DoH or DoT with a reputable public resolver is a meaningful, low-effort upgrade over plaintext ISP DNS. Running your own recursive resolver is the move for people who specifically do not want any single company holding a log of every domain their household looks up, and who are comfortable with the ongoing maintenance, the same trade-off calculus behind running Vaultwarden instead of a cloud password vault, or picking a local-only authenticator app over a synced one.
Frequently asked questions
Does encrypted DNS stop my ISP from seeing what sites I visit?
Partially. It hides the DNS lookup itself, but your ISP can still often see the destination IP address you connect to and, unless ECH is in use, the domain name in the TLS handshake's SNI field.
What is the difference between DNS over HTTPS and DNS over TLS?
Both encrypt the same DNS query; they differ in transport. DoT uses a dedicated connection that is easier for a network to block outright. DoH tunnels over standard HTTPS, blending in with normal web traffic and making selective blocking harder.
Is Cloudflare DNS actually private?
Cloudflare's resolver encrypts your query in transit and publishes a no-logging policy, but using it still means Cloudflare, rather than your ISP, sees every domain you look up. It relocates the point of observation; it does not eliminate one.
Should I run my own DNS server at home?
Only if you specifically want to remove any third-party resolver from seeing your household's DNS queries and you are willing to maintain it. Unbound as a recursive resolver, paired with Pi-hole for ad-blocking, does this, but a public encrypted resolver is a reasonable, lower-effort choice for most people.
What is Encrypted Client Hello (ECH)?
ECH is a TLS extension that encrypts the SNI field, the domain name that is otherwise sent in plaintext during the handshake. It closes the gap that encrypted DNS alone leaves open, but only works when the site and its server support it and when your DNS lookup for the ECH keys is itself encrypted.
Does ECH work without DoH?
Technically the browser can still fetch the keys over plaintext DNS, but then an observer reads the domain from that lookup instead. ECH delivers its privacy benefit only together with encrypted DNS.
Does a VPN make encrypted DNS unnecessary?
If your DNS queries go through the tunnel, the VPN provider sees them instead of your ISP, so you have moved the trust again. If they leak outside the tunnel, the VPN does not protect them at all, so test it.
More from Self-Hosting & Privacy

Proton Drive, Tresorit, and self-hosted Nextcloud compared on real November 2026 pricing: what each costs per GB, who holds the encryption key, and what running Nextcloud on a home Proxmox server actually involves day to day.

Self-hosting email sounds like the next homelab step after Tailscale and Docker. Here's why deliverability, not the DNS setup, is what actually breaks it, the real DKIM/SPF/DMARC config, and the honest cost vs Proton Mail.

Privacy.com makes single-use and merchant-locked card numbers, but it's US-only. Here's how its free and paid card limits stack up against Revolut, Capital One, and Wise — and whether you need any of them.
Stay in the loop
Get the latest articles delivered to your inbox. No spam, unsubscribe anytime.
Is Identity Theft Protection Worth It?
Credit freezes have been free by federal law since 2018. A real cost comparison of paid identity theft protection against the free DIY path, and the narrow cases where paying still earns its price.
Continue Reading