DNS over QUIC (DoQ) Explained: How It Works

Updated on
10 min read

DNS over QUIC (DoQ) carries DNS queries over QUIC, an encrypted transport that runs on UDP. It gives each DNS transaction its own stream within a reusable connection, combining DNS’s small request-and-response pattern with QUIC’s security and loss recovery. This explainer is for network engineers, resolver operators, and developers comparing encrypted DNS transports. It covers how DoQ works, where it fits beside DNS over HTTPS (DoH) and DNS over TLS (DoT), and what it does not hide.

Why DNS over QUIC Is Being Discussed

DNS is a frequent, latency-sensitive part of using the internet. Traditional DNS usually sends queries without transport encryption, so a network observer can read or alter requests between a device and its recursive resolver. DoT and DoH already encrypt that client-to-resolver connection, but their underlying transports have different behavior: DoT uses TLS over TCP, while DoH uses HTTP over TLS.

QUIC was designed as a secure transport with multiplexed streams, integrated TLS 1.3, and connection migration. Applying it directly to DNS offers a third encrypted transport without requiring HTTP. The IETF’s DNS over QUIC specification, RFC 9250, defines how DNS messages use QUIC streams. The QUIC transport specification, RFC 9000, describes the underlying connections and streams, while RFC 9001 explains how TLS secures QUIC.

DoQ is part of the wider DNS privacy effort, which includes resolver software, client support, and deployment practices. The DNS Privacy project coordinates work across these areas. Adoption depends on software and network support: a standardized protocol does not mean every phone, router, operating system, or resolver already speaks it.

What Is DNS over QUIC?

DoQ is a mapping of the DNS protocol onto QUIC. A client establishes a QUIC connection to a resolver, negotiates the doq application protocol, and sends DNS messages over QUIC streams. QUIC uses TLS 1.3 for encryption and authentication; DoQ does not add a separate HTTP layer.

The default DoQ service port is UDP 853. This is the same port number used by DoT over TCP, but the transports are distinct: a firewall rule for TCP 853 does not permit DoQ’s UDP traffic. The protocol is not intended to use UDP port 53, which remains associated with ordinary DNS. A deployment can agree on another port, but clients and servers need matching configuration.

DoQ can be used between a stub resolver and a recursive resolver, between recursive and authoritative servers, and for name-server-to-name-server transfers. Each network leg is a separate connection choice. Enabling DoQ on a laptop does not automatically make the recursive resolver’s queries to authoritative servers encrypted.

The Problem DoQ Solves

In conventional DNS, queries are visible to devices on the path from a client to its resolver. Depending on the network, this can include a Wi-Fi operator, an internet provider, or a compromised intermediary. A tampered response can also misdirect a client if other protections do not catch it.

DoQ encrypts and authenticates the transport between its two endpoints. It can reduce the setup and head-of-line delays associated with TCP-based DNS transports, while allowing multiple queries to share a connection. These are transport properties, not a guarantee of faster lookups: resolver distance, caching, network loss, server load, and client implementation still determine observed latency.

The key change is who can observe the query. A network intermediary generally cannot read DNS content inside a properly authenticated DoQ connection, but the recursive resolver can. DoQ therefore shifts trust from the local network path to the resolver operator; it does not remove that trust decision.

How DoQ Works

A typical client-to-resolver lookup follows this path:

Application
    |
    v
Stub resolver -- QUIC connection (UDP 853) --> Recursive resolver
                                                   |
                                                   v
                                     Authoritative DNS servers

The client and resolver establish QUIC, negotiate the doq protocol identifier using ALPN, and authenticate the connection according to their configured trust profile. QUIC’s TLS integration protects connection data. The QUIC security specification describes its TLS 1.3 handshake and key establishment.

DoQ then maps each DNS query and its response to a separate client-initiated bidirectional QUIC stream. The resolver returns the response on that same stream. A two-octet length field frames each DNS message, as with DNS over TCP; the stream boundary alone is not the DNS message framing. The client signals that it has finished sending the query, and the server signals the end of its response. The DNS message ID is set to zero because the stream identifies which response belongs to which query.

This mapping allows a client to send concurrent queries over one connection. If packets carrying data for one stream are lost, QUIC can recover them without forcing application data on every other stream to wait for that stream’s in-order delivery. Streams still share a connection, congestion control, and resource limits, so they are not independent network paths. A connection failure can affect all its outstanding queries.

The resolver can reuse an established connection for later lookups, avoiding a new transport handshake for each query. QUIC also supports connection migration when endpoints and network policy allow it, which can help an active connection survive a client network change. Neither feature removes the need to handle timeouts, retransmission, connection closure, or resolver failover.

DoQ’s scope includes DNS transfers, where one query can receive multiple response messages on a stream. It does not provide server-initiated transactions such as DNS Stateful Operations. Implementations must follow the RFC’s stream mapping and error handling rather than treating DoQ as arbitrary DNS bytes sent over any QUIC connection.

DoQ Compared with Other DNS Transports

Feature Traditional DNS DoT DoH DoQ
Underlying transport UDP or TCP TCP with TLS HTTP over TLS QUIC over UDP
Common port UDP/TCP 53 TCP 853 HTTPS, commonly 443 UDP 853
Message mapping DNS datagrams or TCP framing DNS messages in a TLS stream DNS carried by HTTP DNS messages mapped to QUIC streams
Transport encryption Not provided by DNS itself TLS TLS TLS 1.3 through QUIC
Concurrent-query behavior Depends on transport and client Queries share a TCP connection HTTP request handling A separate QUIC stream per query
Network operations Widely supported; content is usually visible Dedicated TCP port is identifiable Blends with HTTPS traffic, but needs HTTP support Requires UDP reachability and a DoQ-capable client

DoH over HTTP/3, sometimes called DoH3, is not DoQ. DoH3 keeps DNS inside HTTP and uses HTTP/3 as its application transport; DoQ carries DNS directly over QUIC. A resolver may offer both, but a client must implement and select the intended protocol.

Components and Key Concepts

  • Stub resolver: The client-side component that sends DNS questions for applications. It must support DoQ and know how to reach and authenticate a DoQ resolver. An application’s private DNS setting can differ from the operating system’s resolver.
  • Recursive resolver: The service that accepts the query, checks its cache, and obtains an answer when needed. It sees the complete DNS question and can apply its own logging, filtering, and validation policies.
  • QUIC connection and streams: The connection provides security, congestion control, and shared state. Each DNS transaction uses its own bidirectional stream, allowing independent ordering between queries.
  • ALPN and server identity: During the QUIC handshake, ALPN identifies the application protocol as doq. Clients also need an appropriate trust profile so encryption is connected to the intended resolver rather than an arbitrary endpoint.
  • UDP reachability: DoQ requires an available UDP path, normally to port 853. Firewalls, NATs, captive portals, and network policies can block it even when ordinary DNS or HTTPS works.
  • DNSSEC: DNSSEC lets a validating resolver check signatures on DNS data; it does not encrypt the transport. DoQ protects a connection, while DNSSEC authenticates DNS data. They solve different problems. See the guide to DNSSEC validation and key management.

Real-World Use Cases

DoQ is useful where a client and its chosen resolver both support it and the network permits UDP traffic. A device on public Wi-Fi can encrypt its connection to a trusted recursive resolver instead of exposing DNS questions to the local path. A home or enterprise resolver can also accept DoQ from managed clients, centralizing resolver policy while encrypting the last hop.

Recursive operators may deploy DoQ for upstream queries to authoritative servers, or for transfers between supporting name servers. That is an operator-level choice: clients using DoQ to a recursive service do not determine which transport the service uses for its own upstream lookups.

Provider support is changing as resolver software and clients add the protocol. For example, Quad9 documents DNS over QUIC support and lists its service addresses and supported features. Check a provider’s current instructions and privacy policy before selecting an endpoint.

Practical Guide: Test a DoQ Resolver

The kdig utility from Knot DNS can send DoQ queries when built with QUIC support. On Debian or Ubuntu, install the DNS utilities package; on Fedora, install Knot’s utilities:

# Debian or Ubuntu
sudo apt install knot-dnsutils

# Fedora
sudo dnf install knot-utils

Confirm that the installed build supports QUIC before testing:

kdig -V

The kdig manual documents the +quic option. Version output alone does not confirm that a build includes QUIC support, so the explicit query below should fail clearly if it is unavailable. Query Quad9 over DoQ, explicitly enabling certificate validation and checking the resolver name:

kdig +quic +tls-ca +tls-hostname=dns.quad9.net \
  @dns.quad9.net example.com A

The +quic option selects DNS over QUIC; the resolver hostname supplies the identity to validate. A successful answer confirms that the client completed a DoQ query, not that every application on the device now uses encrypted DNS. Use your operating system or application settings to configure its resolver separately.

If the command reports an unsupported option or QUIC library, use a client build that supports DoQ rather than assuming it fell back successfully. A timeout can indicate blocked UDP 853, a provider or routing issue, or an endpoint name problem. A certificate error means the client could not validate the resolver identity; check the system trust store and configured hostname instead of disabling verification. To compare the transaction with the rest of the DNS lookup process, test the same record using the system resolver and note which transport each test actually selected.

Common Misconceptions

“DoQ is just DoH over HTTP/3.” Both can use QUIC, but their application protocols differ. DoH3 carries DNS through HTTP/3; DoQ maps DNS directly to QUIC streams and does not use HTTP semantics.

“Encryption hides every domain from everyone.” The resolver receives the domain name to answer the query. Other observers may still infer activity from destination addresses, timing, packet sizes, and other metadata. DoQ protects DNS content on a particular connection; it is not an anonymity system.

“A QUIC connection is automatically private and trustworthy.” Encryption protects data in transit, but the client must verify the server identity and choose a resolver it trusts. The resolver can still log queries, and a compromised endpoint can read them.

“DoQ replaces DNSSEC or makes DNS universally faster.” DNSSEC validates DNS data and DoQ protects transport; they are complementary. QUIC’s features may improve some paths, but network conditions, server support, and resolver performance determine actual latency.

Changelog

  • 2026-11-27: Published the canonical explainer for DNS over QUIC.
TBO Editorial

About the Author

TBO Editorial writes about the latest updates about products and services related to Technology, Business, Finance & Lifestyle. Do get in touch if you want to share any useful article with our community.