What both of them fix
A classic DNS lookup leaves your device as an unencrypted UDP packet on port 53. Your Wi-Fi operator, your ISP and anyone between you and the resolver can see the name, and a hostile network can change the answer. Encrypted DNS closes that gap on the hop between your device and the recursive resolver that answers for you. See what is DNS for how that resolver fits in.
The two protocols
| DNS over TLS (DoT) | DNS over HTTPS (DoH) | |
|---|---|---|
| Standard | RFC 7858 | RFC 8484 |
| Port | 853 | 443 |
| Carried in | A TLS connection of its own | HTTPS requests |
| Visible as DNS to the network | Yes, the port gives it away | No, it looks like web traffic |
| Easy to block | Yes, block port 853 | Hard without blocking the resolver address |
| Where it's set up | Operating system (Android Private DNS, Linux, routers) | Browsers and operating systems |
A third option, DNS over QUIC (RFC 9250), also uses port 853 and is less widely deployed.
Which one to choose
- Network administrators usually prefer DoT, because it sits on its own port and can be allowed, logged or blocked on purpose.
- Individual users often get DoH, because browsers support it and it keeps working on networks that block unusual ports.
- Speed is about the same. A resolver close to you matters much more than the protocol.
On Android, Private DNS is DoT: enter the resolver hostname. In Firefox and Chrome, DoH is a setting under privacy and security. Windows 11 supports DoH for resolvers it knows. The big public resolvers, including Cloudflare (1.1.1.1), Google (8.8.8.8) and Quad9 (9.9.9.9), offer both. The public DNS servers page lists them and tests their response time from your connection.
Compare resolvers before you switch:
What encryption does not do
- It doesn't hide where you go. The IP address you connect to is still visible, and the site name is often sent in the clear in the TLS handshake.
- It moves trust, it doesn't remove it. The resolver you pick sees every name you look up. Choose one whose privacy policy you accept.
- It doesn't cover the rest of the path. The resolver still talks to authoritative servers, usually unencrypted.
- It doesn't prove answers are genuine. That's the job of DNSSEC. See DNS attacks explained.
Turning it on
- Pick a resolver that supports the protocol you want, and note its hostname or DoH address.
- Enter it in the browser or operating system setting.
- Open a site and confirm it loads. If a work or school network stops resolving internal names, switch back, because internal names live on the organisation's own resolver.