DNS-over-HTTPS vs DNS-over-TLS (DoH vs DoT): Ports, Speed, and Privacy Compared

DNS over HTTPS (DoH) and DNS over TLS (DoT) are two encrypted DNS transport protocols that stop ISPs and attackers on public Wi-Fi from reading or hijacking your DNS lookups. DoH disguises queries inside standard HTTPS traffic on port 443, whereas DoT uses dedicated port 853. The main trade-off between DoH and DoT balances user stealth against network firewall visibility.

DoH vs DoT vs DoQ vs Plaintext DNS: Side-by-Side Comparison Table

Traditional DNS transmits every domain lookup (QNAME) in cleartext over port 53, whereas DoH applies encryption at the Application Layer (port 443 HTTPS), and DoT applies encryption directly at the Transport Layer (port 853 TLS). The table below compares 4 DNS transport methods across 9 technical dimensions.

Feature / Dimension Plaintext DNS (Do53) DNS over TLS (DoT) DNS over HTTPS (DoH) DNS over QUIC (DoQ)
IETF Standard RFC 1035 (1987) RFC 7858 (2016) RFC 8484 (2018) RFC 9250 (2022)
Default Network Port Port 53 (UDP / TCP) Port 853 (TCP) Port 443 (TCP / UDP) Port 853 (UDP)
Transport Protocol UDP (TCP fallback) TLS over TCP HTTPS (TLS / HTTP/2 or HTTP/3) QUIC (TLS 1.3 over UDP)
Message Format Binary DNS packet Binary DNS (2-byte prefix) HTTP GET/POST (application/dns-message or JSON) Binary DNS over QUIC
Traffic Visibility on Network Exposed (Plaintext) Identifiable (Port 853) Concealed (Port 443) Identifiable (UDP 853)
Ease of Firewall Blocking Trivial to filter or spoof Simple (Block TCP port 853) Difficult (Port 443) Simple (Block UDP port 853)
Encryption Scope None (Unencrypted) Stub to recursive Stub to recursive Stub to recursive
Primary Design Target Legacy networks OS stub resolvers Browsers and web apps Mobile & IoT links
Head-of-Line Blocking Protection None (Independent UDP) Stalled by packet loss Stalled on HTTP/2; protected on HTTP/3 Protected via QUIC

The IETF standardized both protocols for distinct environments. Engineering teams designed DoT in 2016 for operating system stub resolvers wrapping binary packets inside a dedicated TLS socket on port 853. The IETF ratified DoH in 2018 for applications querying HTTPS endpoints directly without system privileges. Core concepts are detailed in What Is DNS and What Is SSL/TLS.

How Does DNS over TLS (DoT) Work Compared to DNS over HTTPS (DoH)?

Both protocols use identical TLS cryptographic ciphers to encrypt your DNS queries, but DoT encapsulates raw binary DNS messages directly inside a dedicated TCP port 853 TLS stream, whereas DoH formats each lookup as an HTTP GET or POST request sent to a URI endpoint on port 443. Engineers distinguish the mechanics across 2 operational pipelines:

  1. How DNS over TLS (DoT) Works on TCP Port 853: Technical guides often mislabel DoT as using UDP, but DoT operates strictly over persistent TCP connections across two operating modes: Opportunistic mode (falls back to plaintext port 53 if TLS fails) and Strict mode (requires a verified TLS certificate or blocks the lookup). The client stub resolver connects on port 853, negotiates ciphers via TLS 1.0 to 1.3: Versions Compared, validates hostnames like one.one.one.one or dns.google, and pipelines binary DNS packets prefixed with two-byte length indicators.
  2. How DNS over HTTPS (DoH) Works on Port 443 (/dns-query): DoH connects to an HTTPS URI endpoint on port 443, such as https://cloudflare-dns.com/dns-query. The client transmits queries via HTTP GET or POST using MIME type application/dns-message (or application/dns-json for browser tools), multiplexing lookups over established HTTP/2 or HTTP/3 sessions.

Terminal users query public DoH endpoints directly via curl:

# Query Cloudflare 1.1.1.1 over DoH (Port 443) using curl:
curl -H "accept: application/dns-json" "https://cloudflare-dns.com/dns-query?name=example.com&type=A"

Browser diagnostic tools query DoH endpoints directly from JavaScript. This enables utilities like the DNS Propagation Checker and DNS Resolver Tester to test global resolvers directly.

DoH vs DoT Performance and Speed: Which Protocol Is Faster?

In real-world benchmarks, DoT and DoH deliver near-identical lookup speeds within 2 to 8 milliseconds of each other, shaped by 3 transport factors: HTTP framing overhead, connection reuse, and HTTP/3 QUIC multiplexing:

  1. Raw Protocol Framing Overhead (DoT Is Slightly Leaner Over TCP): DoT transmits binary packets over TLS without HTTP headers, requiring fewer server parsing cycles than HTTP/2 DoH requests.
  2. Persistent Connection Reuse and Query Pipelining (Ties DoT and DoH): Initial handshakes add round-trip overhead. Both protocols eliminate this penalty by maintaining persistent connections, pipelining lookups, and resuming sessions via TLS 1.3 0-RTT.
  3. HTTP/3 and DNS over QUIC (DoQ) Eliminate TCP Head-of-Line Blocking: Dropping a TCP packet on lossy wireless networks stalls queued lookups on that socket. DoH over HTTP/3 and DNS over QUIC (DoQ on UDP port 853) run over QUIC streams, resolving lookups concurrently.

Network proximity to the nearest Anycast node drives real-world latency more than framing differences. Administrators benchmark resolution latency across public resolvers using the DNS Speed Test.

Privacy vs Network Visibility: Why Browsers Prefer DoH and Enterprises Prefer DoT

The choice between DoH and DoT centers on who controls the DNS channel: DoH maximizes individual user privacy and censorship resistance on port 443, whereas DoT preserves network administrator visibility and firewall control on port 853. Network architects balance these divergent priorities through 2 operational models:

  1. Why End Users, Journalists, and Browsers Prefer DoH (Port 443 Stealth): Restrictive networks often block DoT by dropping outbound TCP port 853. DoH shares port 443 with standard HTTPS traffic, preventing firewalls from blocking DNS lookups without breaking general web browsing. Deploying ECH encrypts the SNI header, shielding visited domains.
  2. Why Corporate IT and Security Teams Prefer DoT (Port 853 Governance): Enterprise security teams rely on internal resolvers to filter malware and log threats. Unmanaged browser DoH connections bypass corporate controls. Dedicated port 853 assignments allow firewalls to identify encrypted DNS traffic and direct queries exclusively through audited DoT forwarders.

Both protocols eliminate local on-path DNS Hijacking and eavesdropping across untrusted access networks. Users verify which recursive resolver currently handles outbound queries through the DNS Leak Test.

What Neither DoH Nor DoT Protects Against (3 Critical Security Boundaries)

Enabling DoH or DoT encrypts the link to your recursive resolver, but 3 security boundaries remain outside both protocols: upstream authoritative queries, cryptographic record authenticity (DNSSEC), and full-traffic IP masking (VPN):

  1. Neither Protocol Encrypts DNS End-to-End (Stub-to-Recursive Only): DoH and DoT protect only the first hop between the client stub resolver and the recursive resolver. Upstream queries travel over unencrypted port 53 UDP when the resolver queries authoritative servers as explained in How DNS Works. The resolver operator retains visibility into client IP addresses and requested domains.
  2. DoH and DoT Do Not Replace DNSSEC (Confidentiality vs Authenticity): Transport encryption shields lookups from local eavesdroppers, but provides zero validation of upstream zone accuracy. A compromised resolver returns forged records over encrypted sessions unless authoritative zones deploy What Is DNSSEC. DNSSEC signs records cryptographically, enabling resolvers to verify authenticity independently.
  3. DoH and DoT Do Not Replace a VPN (DNS Lookups vs Full IP Traffic): Encrypted DNS conceals domain lookups, but devices connect directly to destination IP addresses. Network operators inspect destination IPs and unencrypted SNI headers. Full traffic masking requires a virtual private network.

Designing strong domain perimeters requires layering transport encryption alongside zone signing records, documented in DNS Security.

Public DoH and DoT Resolver Endpoints and How to Enable Them on Your Device

Major public DNS providers operate free, DNSSEC-validating DoH (port 443) and DoT (port 853) endpoints using TLS hostnames or HTTPS URLs. The table below lists configuration values for 4 leading public resolvers.

Public DNS Provider IP Addresses DoT Hostname (TCP Port 853) DoH Endpoint URI (HTTPS Port 443)
Cloudflare (1.1.1.1) 1.1.1.1, 1.0.0.1 / 2606:4700:4700::1111 one.one.one.one https://cloudflare-dns.com/dns-query
Google Public DNS 8.8.8.8, 8.8.4.4 / 2001:4860:4860::8888 dns.google https://dns.google/dns-query
Quad9 (Malware Blocking) 9.9.9.9, 149.112.112.112 / 2620:fe::fe dns.quad9.net https://dns.quad9.net/dns-query
AliDNS 223.5.5.5, 223.6.6.6 / 2400:3200::1 dns.alidns.com https://dns.alidns.com/dns-query

Enabling encrypted DNS on personal devices involves entering these endpoints across 4 platforms:

  1. Web Browsers (Chrome, Edge, Brave, Firefox): Open Privacy settings, enable Secure DNS, and select Cloudflare (1.1.1.1) or enter a custom DoH endpoint URI from the table above.
  2. Windows 11 (Native System-Wide DoH): Open Network settings, edit DNS assignments under Wi-Fi or Ethernet, enter 1.1.1.1, and select On (automatic template) under DNS over HTTPS.
  3. Android 9+ (Native System-Wide DoT via Private DNS): Open Network settings → Private DNS, choose Private DNS provider hostname, and enter a DoT hostname like one.one.one.one or dns.google.
  4. Apple Devices (iOS 14+, macOS 11+) and Linux: Install an encrypted mobileconfig profile on Apple devices, or set DNSOverTLS=yes inside /etc/systemd/resolved.conf on Linux.

Configuring operating system resolvers alongside browser settings ensures complete encrypted DNS coverage.

Deploying encrypted DNS via DNS-over-HTTPS (DoH) or DNS-over-TLS (DoT) upgrades legacy plaintext traffic into secure channels. Choosing between port 443 HTTPS encapsulation and port 853 TLS tunnels balances privacy against network visibility, while DNS over QUIC (DoQ) eliminates latency penalties across modern networks.

Frequently asked questions

Which is better for home users: DoH or DoT?+

DNS over HTTPS (DoH) on port 443 serves as the superior default for home users and mobile laptops on public Wi-Fi. Chrome, Firefox, Edge, and Windows 11 support DoH natively. Encapsulating queries within standard HTTPS traffic prevents local firewalls from blocking lookups without terminating general web connectivity.

Does Android "Private DNS" use DoH or DoT?+

Android's built-in Private DNS setting uses DNS over TLS (DoT) on TCP port 853 (and DNS over QUIC on Android 13+ when available). That is why Android requires a TLS hostname like dns.google or one.one.one.one rather than an https:// URL.

Can my ISP still see what websites I visit if I use DoH or DoT?+

No, your ISP loses visibility into your plaintext DNS lookups under DoH or DoT. However, your ISP identifies destination IP addresses and unencrypted TLS SNI hostnames during initial connections unless Encrypted Client Hello is active. In practice, full traffic privacy requires pairing encrypted DNS with Encrypted Client Hello (ECH) or routing connections through a trusted full-tunnel VPN.

Can I use DoH or DoT together with DNSSEC?+

Yes, DoH, DoT, and DNSSEC operate together across separate security layers. DoH and DoT encrypt the connection between your device and the recursive resolver (such as 1.1.1.1), while the recursive resolver validates DNSSEC digital signatures to verify that authoritative records remain authentic. In production security architectures, we recommend enabling both protocols simultaneously: transport encryption shields the local last-mile link, while DNSSEC guarantees upstream zone data authenticity.

Last verified: 2026-11-22