Skip to content
AdminKit

DoH vs DoT: the DNS-privacy tradeoffs explained

DNS-over-HTTPS (DoH) and DNS-over-TLS (DoT) both encrypt DNS queries so a network observer can't read which domains you're looking up, but they differ in one practical way: DoT runs on its own port and is trivial to block, while DoH blends in with ordinary HTTPS traffic on port 443, which AdminKit's DNS resolver test can help you tell apart.

By AdminKit team, Netbase JSC · Updated

Key takeaways

  • DoT and DoH both encrypt DNS between your device and one resolver. Neither hides your queries from that resolver.
  • DoT uses its own port, 853, so a network can see it, allow it or block it. DoH uses port 443 and looks like ordinary web traffic.
  • That one difference decides most of the trade-off: DoT suits networks that need DNS policy; DoH resists selective blocking and is built into the major browsers.
  • “Strict” encrypted DNS fails closed if the resolver can’t be authenticated; “opportunistic” falls back to plaintext. The setting matters as much as the protocol.
  • Encryption and DNSSEC solve different problems. You want both.

Why is plaintext DNS a privacy gap?

Every time a device resolves a domain name, it sends that query to a recursive resolver, and under the original DNS design, that query and its answer travel as plaintext — no encryption at all. This is a separate problem from the one DNSSEC solves: DNSSEC verifies that a DNS answer hasn’t been forged or tampered with, but it does nothing to hide the query from anyone watching the network (see our guide on what DNSSEC actually protects for that distinction in detail). Plaintext DNS means an ISP, a public Wi-Fi operator, or anyone positioned on the network path between you and your resolver can build a complete record of every domain you look up, even for sites you access entirely over HTTPS — the DNS lookup that precedes the HTTPS connection already gave away the destination. The IETF’s DPRIVE working group was formed specifically to address this gap, and DoT and DoH are its two resulting standards.

How does DoT work, and why is it easy to identify?

RFC 7858 defines DNS-over-TLS, which wraps standard DNS messages inside a TLS-encrypted connection on its own reserved port, 853. Architecturally, this is the simpler of the two approaches — it’s DNS wrapped in TLS, nothing more. The dedicated port is both DoT’s main practical strength and its main practical weakness depending on who you ask: a network operator who wants visibility into DNS traffic, or wants to enforce a specific resolver for content filtering or malware-domain blocking, can simply monitor or block port 853 without touching any other traffic. That makes DoT straightforward to deploy predictably on a managed network, but also straightforward for a restrictive network (or a censoring one) to block outright, forcing clients back to unencrypted DNS or no DNS at all.

How does DoH work, and why is it harder to block?

RFC 8484 defines DNS-over-HTTPS, which carries the same underlying DNS messages but frames them as HTTPS requests on port 443 — the same port essentially every website uses. This is the detail that matters most in practice: at the network level, a DoH query looks like ordinary HTTPS traffic to whatever resolver’s DoH endpoint it’s hitting. A network that wants to block DoH specifically, without blocking HTTPS broadly, generally has to resort to identifying and blocking specific known DoH endpoint addresses or using more invasive TLS inspection — neither of which is as simple as blocking one port. This is exactly why DoH has become the more broadly adopted option in consumer browsers (built into Firefox, Chrome, and Edge’s settings) and also why some enterprise and school network administrators specifically disable browser-level DoH, preferring to keep DNS on a visible, governable path through infrastructure they control. Mozilla’s own support documentation confirms Firefox ships with DoH built in and configurable directly from the browser’s settings, independent of any OS-level DNS configuration. Oblivious DoH (ODoH) builds one further privacy layer on top of plain DoH, splitting a query so the resolver sees the query but not the client’s IP address, and a proxy sees the IP but not the query.

DoH is also easy to use from code, because it’s just an HTTPS request. AdminKit’s own DNS lookup is a DoH client: its server-side function sends each query to Cloudflare’s public DoH resolver and asks for a JSON answer. Cloudflare’s JSON API documentation says these queries are plain GET requests with the DNS question encoded in the URL and an Accept: application/dns-json header. The same request from a terminal looks like this:

Example request (Cloudflare's documented DoH JSON API; example.com is a reserved name)

$ curl -s -H 'accept: application/dns-json' \
    'https://cloudflare-dns.com/dns-query?name=example.com&type=A'

How do DoT, DoH and DoQ compare?

AspectDoT (RFC 7858)DoH (RFC 8484)DoQ (RFC 9250)
Transport and portTLS over TCP, port 853HTTPS, port 443QUIC over UDP, port 853
Easy to spot on the networkYes, by portNo, looks like web trafficYes, by port
Easy to block selectivelyYes: block port 853Only by blocking known endpoints or inspecting TLSYes: block UDP port 853
Typical place it’s configuredOperating system, router, resolver softwareBrowser or app, increasingly the OSResolver software and some clients
Best fitManaged networks that need DNS policyIndividual users who want privacy without extra setupResolvers and clients that already support QUIC

RFC 9250 adds DNS over dedicated QUIC connections (DoQ). It uses UDP port 853 and must not use port 53, so for blocking and monitoring it behaves like DoT rather than DoH.

What is the trade-off in one sentence?

DoT trades blockability for simplicity and clear separation from web traffic; DoH trades a harder-to-govern network boundary for resistance to selective blocking and broader out-of-the-box browser support. Neither is “more secure” than the other in a cryptographic sense — both use TLS underneath — the difference that actually matters is operational: who can see that DNS is happening at all, and who can enforce policy over it.

What happens when the encrypted connection fails?

This is the setting people overlook. RFC 8310 defines two usage profiles for encrypted DNS clients:

  • Strict Privacy: the client “requires both an encrypted and authenticated connection” to the resolver, and “a hard failure occurs if this is not available.” Lookups stop rather than leak.
  • Opportunistic Privacy: the client tries encryption and authentication but may end up with an encrypted-only or a cleartext connection, and carries on resolving either way.

Opportunistic mode protects you from someone passively watching, but an active attacker who blocks port 853 just pushes the client back to plaintext. On Linux with systemd-resolved, the choice is a single line:

Example /etc/systemd/resolved.conf (documentation address and name)

[Resolve]
DNS=192.0.2.53#dns.example.net
DNSOverTLS=yes              # strict: fail if TLS to the resolver fails
# DNSOverTLS=opportunistic  # try TLS, fall back to plaintext

The #dns.example.net part names the server the TLS certificate must match. Without it, a client can encrypt but can’t authenticate who it’s talking to.

How does a device find an encrypted resolver on its own?

Most networks hand out a plain resolver address through DHCP. RFC 9462 (Discovery of Designated Resolvers) lets a client ask that resolver whether it also offers DoH, DoT or DoQ. The client queries the special name _dns.resolver.arpa for an SVCB record, and a resolver that supports it answers with its encrypted endpoints. The RFC’s own example describes a DoH server:

Example from RFC 9462 §4

_dns.resolver.arpa.  7200  IN SVCB 1 doh.example.net (
     alpn=h2 dohpath=/dns-query{?dns} )

The client then upgrades to the encrypted endpoint, after checking that its certificate also covers the original resolver’s IP address. This keeps DNS with the network’s own resolver, so its filtering keeps working, while taking the queries off the wire in plaintext. Whether your device does this depends on its operating system and settings.

What doesn’t either protocol change?

Switching to DoH or DoT does not change who can see your queries in an absolute sense — it only changes the hop between your device and the resolver. The resolver itself still sees every query in full, so your actual privacy posture depends entirely on which resolver you point DoH/DoT at and that resolver’s own data retention and sharing practices. It also doesn’t change anything about DNS authenticity — a DoH or DoT connection to a resolver that itself returns tampered answers, or that doesn’t validate DNSSEC, offers encryption without the integrity guarantee DNSSEC separately provides. Encrypting the transport also says nothing about how much of the query itself each server along the resolution path gets to see; see QNAME minimization for the separate, resolver-side technique that limits that.

Encrypted DNS also leaves other signals in place. The IP address your device connects to after the lookup is still visible, and so is the server name in a TLS handshake unless the site and browser use Encrypted ClientHello.

How do you check your own setup?

AdminKit’s DNS resolver test page shows how to find out which resolver your current connection is actually using. DNS lookup is free and lets you inspect specific records directly. Most large public DoH/DoT resolvers (Cloudflare, Google, Quad9) are deployed via anycast, so the specific server that actually answers a given query depends on where the request originates, not a single named machine. If you’re on a managed network (work, school) and DNS lookups behave differently than expected, that’s often a deliberate network policy around DoH/DoT rather than a misconfiguration — worth confirming with whoever manages that network before assuming something is broken.

DNS privacy (DoH/DoT) and DNS authenticity (DNSSEC) are complementary, not competing, protections — see DNSSEC: what it actually protects for the authenticity half of this picture, and is my router’s DNS hijacked for a related DNS-trust scenario that encryption alone doesn’t fully prevent. When a browser uses DoH and the rest of the system doesn’t, two programs on the same machine can get different answers; DNS answers that differ between resolvers covers how to untangle that.

This guide is general information, not a security audit of your specific network — see our disclaimer for what AdminKit's guidance does and does not commit to.

Frequently asked questions

What problem do DoH and DoT actually solve?

Both solve DNS confidentiality: ordinary DNS queries and answers travel in plaintext, so anyone on the network path — your ISP, a public Wi-Fi operator, or anyone positioned to observe traffic — can see every domain you look up, even if the sites themselves use HTTPS. DoH (RFC 8484) and DoT (RFC 7858) each wrap DNS queries in an encrypted channel so only the resolver you're talking to can see the actual query. Neither protects against the resolver itself, or anyone the resolver shares data with, seeing your queries — you're still trusting whichever resolver you point DoH/DoT at.

What's the actual technical difference between DoH and DoT?

DoT (DNS-over-TLS, RFC 7858) wraps DNS queries in TLS and runs on a dedicated port, 853, reserved specifically for this purpose. DoH (DNS-over-HTTPS, RFC 8484) wraps DNS queries inside HTTPS requests and runs on port 443 — the same port used for essentially all web traffic — which means a DoH query is, at the network level, indistinguishable from someone loading a webpage. That single difference in port and framing drives almost every practical tradeoff between the two.

Why would a network administrator care which one is used?

Because DoT's dedicated port makes it easy to identify and selectively block or monitor at a network boundary — a school, enterprise, or ISP wanting to enforce a specific resolver (for content filtering, malware-domain blocking, or compliance) can simply block port 853 and force DNS back through a visible, policy-controlled path. DoH on port 443 can't be blocked without also blocking general HTTPS traffic, which isn't practical — so a device or browser configured to use DoH to an external resolver can bypass network-level DNS policy entirely, which is why some enterprise and school network policies explicitly disable browser-level DoH in favor of an org-managed resolver.

Does using DoH or DoT mean a resolver can't see what I'm looking up?

No — the resolver you're querying still sees every query in full; encryption protects the query in transit between you and that resolver, not from the resolver itself. Your privacy posture is only as good as whichever resolver you choose and what that resolver's own logging and data-sharing policy says it does with query data. Switching to DoH/DoT without checking the resolver's privacy policy just moves who can see your DNS activity, it doesn't remove visibility altogether.

Which one should I actually use?

For most individual users, DoH is the more broadly supported option today — it's built into every major browser's settings and doesn't require separate OS-level configuration the way DoT sometimes does. For managed networks that need DNS policy enforcement to keep working (content filtering, malware-domain blocking, compliance logging), DoT's blockability is a feature, not a limitation, and many organizations prefer it, or prefer disabling browser-level DoH, specifically to keep DNS visible and governable on their own infrastructure.

Want AdminKit to watch this for you?

Free checks tell you the state today. Protective DNS and monitoring tell you when it changes.

Huy Nguyen (David), Founder and CEO of Netbase JSC

Talk to an expert

Huy Nguyen (David), Founder & CEO, Netbase JSC

Ask whether this fix applies to your setup, or get a second pair of eyes on your DNS and mail records.