HTTPS resource record

term

networkingweb devsecurity

Kept in this browser · My desk

A DNS record type (type 65) defined in RFC 9460 of November 2023, alongside the general SVCB type (64), that publishes how to connect to a web origin over HTTPS and, by existing, tells clients to use HTTPS for it in a way similar to HSTS.

Before making an http request, a client that supports it looks the record up and, if one exists, behaves as if it had been redirected to https; it can also learn ports, protocols (such as HTTP/3) and address hints before connecting. It brings HSTS-like behaviour to the first visit, but only as far as the DNS answer can be trusted: the RFC says clients must not trust it more than a 307 redirect received over cleartext HTTP, so an attacker controlling the resolver can remove it unless DNSSEC protects the zone.

What it is. RFC 9460, 'Service Binding and Parameter Specification via the DNS (SVCB and HTTPS Resource Records)', by Ben Schwartz, Mike Bishop and Erik Nygren, November 2023, registers two DNS record types: SVCB, value 64, a general service-binding record, and HTTPS, value 65, the 'SVCB-compatible type for use with HTTP'. An HTTPS record sits at the origin's name (or at a prefixed name such as _8443._https.example.com for other ports) and tells a client where and how to reach the HTTPS service.

How it works. Each record has a SvcPriority, a TargetName and SvcParams. 'When SvcPriority is 0, the SVCB record is in AliasMode', pointing to another name, much like a CNAME that can live at a zone apex (example.com. HTTPS 0 svc.example.net.); otherwise it is in ServiceMode, where 'A smaller SvcPriority indicates that the domain owner recommends the use of this record' and the parameters describe the endpoint (example.com. HTTPS 1 . alpn=h3). The parameter keys registered by the RFC are 0 mandatory, 1 alpn (protocols such as h2 and h3), 2 no-default-alpn, 3 port, 4 ipv4hint, 6 ipv6hint, with 5 'ech' reserved for Encrypted ClientHello keys defined elsewhere.

The HSTS connection. Section 9.5: 'An HTTPS RR directs the client to communicate with this host only over a secure transport, similar to HSTS'. 'Prior to making an http scheme request, the client SHOULD perform a lookup to determine if any HTTPS RRs exist for that origin', building the https URL by replacing the scheme and port 80 with 443, a construction 'equivalent to Section 8.3 of [HSTS], Step 5'. If a compatible record exists, the client 'SHOULD behave as if it has received an HTTP 307 (Temporary Redirect) status code with this https URL'. And, as with HSTS's 'no user recourse', a client 'MAY remove the user recourse option' for certificate errors on such an origin, so 'Origins that publish HTTPS RRs therefore MUST NOT rely on user recourse for access'. Chromium's guidance for site owners lists HTTPS RRs among the upgrade mechanisms Chrome respects, beside HSTS and its own HTTPS-first behaviour.

What goes wrong. The limit is in the same section: 'Because HTTPS RRs are received over an often-insecure channel (DNS), clients MUST NOT place any more trust in this signal than if they had received a 307 (Temporary Redirect) response over cleartext HTTP'. An attacker who controls the victim's resolver (a rogue DHCP server, a rogue router advertisement, an evil twin) can simply answer without the record, and the client never learns it should upgrade, unless the zone is signed and the client validates DNSSEC. Publishing an HTTPS record for an origin whose http resources do not mirror its https ones can also break things, the RFC warns.

In practice. A site that wants first-visit protection against stripping still needs HSTS with preloading; the HTTPS record adds a DNS-delivered hint that also carries performance information (HTTP/3 support, alternative endpoints), and becomes a stronger signal on DNSSEC-signed zones.

A worked set of records. The RFC's own examples show the two modes working together: example.com. 7200 IN HTTPS 0 svc.example.net. sends clients for the apex to a provider's name (AliasMode, priority 0), and records at that name in ServiceMode then describe endpoints, for instance svc2.example.net. 7200 IN HTTPS 1 . port=8002, where the dot means 'this same name' and the parameter moves the service to port 8002; for a non-default port the origin's record lives at a prefixed name such as _8443._https.example.com. 'Within a SVCB RRset, all RRs SHOULD have the same mode', and if a set contains an AliasMode record the recipient 'MUST ignore any ServiceMode records in the set'. Parameters a client does not understand are skipped unless listed under the mandatory key, which is how the format stays extensible, for example to carry Encrypted ClientHello configurations under the reserved ech key.

Neighbours. DNS and DNSSEC, HSTS and the preload list, HTTPS-only browser modes, SSL stripping, and TLS Encrypted ClientHello.

Also known as: https rr, https dns record, svcb, rfc 9460, registro https

← Back to H Back to the glossary