SecDNS

DoH vs DoT — comparing DNS over HTTPS and DNS over TLS in 2025

A side-by-side comparison of DNS over HTTPS (RFC 8484) and DNS over TLS (RFC 7858), covering transport, port choice, deployment trade-offs and when each one fits best.

DoH vs DoT — comparing DNS over HTTPS and DNS over TLS in 2025

DNS over HTTPS (DoH) and DNS over TLS (DoT) both wrap classic DNS in TLS so the queries cannot be read or rewritten by anything in the middle. They look similar from a privacy standpoint, but the transport choices behind each one have meaningful operational consequences. This article covers what each protocol is, how they differ, and when to pick one over the other.

What each standard actually says

DNS over TLS is defined by RFC 7858. It runs DNS messages — the same wire format as classic UDP/53 — inside a TLS 1.2+ connection on TCP port 853. Each query carries a 2-byte length prefix and the rest of the packet is unchanged from RFC 1035.

DNS over HTTPS is defined by RFC 8484. It carries DNS messages as the body of an HTTP request or response, using application/dns-message as the content type and port 443. Because it is HTTP, DoH inherits HTTP/2 stream multiplexing, HTTP/3 / QUIC, caching headers, and any middleware your edge stack already understands.

"DoH provides a means for DNS resolution that uses HTTPS as a transport... mitigating the threat of on-path observation and modification." — RFC 8484 §1

Wire-level comparison

PropertyDoH (RFC 8484)DoT (RFC 7858)
TransportHTTP/2 or HTTP/3 over TLSTLS over TCP
Default port443853
Wire formatDNS message wrapped in HTTPLength-prefixed DNS message
Connection reuseMultiplexed via HTTP streamsOne stream per TCP connection
Indistinguishable from web trafficYesNo (dedicated port)
Easy to host on a CDNYesNo
Overhead per querySlightly higher (HTTP headers)Slightly lower

You can probe both with kdig from the knot-dnsutils package:

kdig @1.1.1.1 +tls-ca example.com
kdig @cloudflare-dns.com +https example.com

Deployment trade-offs

DoH is the easier protocol to ship in a browser or a mobile app, because the runtime already speaks HTTPS. Firefox, Chrome and the various OS-level resolver opt-ins all default to DoH. It is also the easier protocol to deliver from a CDN — SecDNS, for example, serves DoH from the same anycast edge as the rest of the product.

DoT is the easier protocol to operate on a constrained device. Routers, smart TVs, IoT gateways and embedded Linux distributions ship with TLS but rarely with a full HTTP/2 stack, and a dedicated port simplifies firewall rules. DoT is also the default on Android 9+ (Private DNS), which is why router vendors typically expose a DoT hostname before they expose a DoH URL.

Operational and policy concerns

Network admins often have stronger feelings about DoH than DoT, because DoH on port 443 looks identical to web traffic and bypasses the corporate resolver unless the operating system honours the new Discovery of Designated Resolvers (DDR) mechanism. DoT runs on a unique port and can be allowed, blocked, or steered with a single firewall rule. Both are equally encrypted; the policy story is what differs.

From a protective-DNS standpoint (covered in What is protective DNS?), both transports preserve the resolver's ability to enforce filtering, log queries and validate DNSSEC. The decision is mostly about which transport the endpoint can speak comfortably.

Choosing a default

A reasonable rule of thumb:

  • Use DoH when the client is a browser, a phone or an application you control and you want CDN-friendly delivery.
  • Use DoT when the client is a router or embedded device, or when you want the admin team to be able to govern encrypted DNS with simple firewall rules.
  • Offer both if you operate the resolver. SecDNS exposes a DoH URL and a DoT hostname per profile so devices can pick whichever they speak natively.

Further reading

Frequently asked questions

Is DoH or DoT faster?

Once a connection is warm, both are dominated by the same network latency to the resolver. DoT tends to have slightly lower per-query overhead because it does not carry HTTP headers, while DoH benefits from HTTP/2 and HTTP/3 connection reuse and is easier to deliver from a CDN edge. For most users the difference is below 10 ms.

Can my network admin block DoH?

DoH on port 443 is indistinguishable from regular HTTPS without TLS interception, so it is hard to block by port alone. Many enterprise firewalls block known DoH endpoints by domain or use a Discovery of Designated Resolvers (DDR) profile to steer clients to an approved internal resolver instead.

Which one should a router or smart TV use?

Embedded devices typically prefer DoT because it is a single TLS stream on a dedicated port (853) with a simple wire format. Browsers, mobile OSes and modern apps prefer DoH because they already speak HTTPS and want the connection multiplexing.

Does encrypted DNS hide the websites I visit from my ISP?

It hides the DNS query itself, but TLS Server Name Indication (SNI) and IP destinations still leak the hostnames you visit unless you also use Encrypted ClientHello (ECH) and a VPN-style egress. Encrypted DNS is a meaningful privacy improvement, not a cloak of invisibility.

Does SecDNS support both?

Yes. Every SecDNS profile exposes a DoH endpoint, a DoT hostname and DNS-over-QUIC. You can mix transports per device without changing the underlying policy.