Alt-SvcAlt-Svc (Alternative Services) is a response header by which the server that answered advertises that 'the same content is also available over another protocol/endpoint.' It is the standard path to enable HTTP/3 (QUIC).
The value is `protocol="host:port"; ma=lifetime`; canonically `Alt-Svc: h3=":443"; ma=86400` announces HTTP/3 support.
Browsers usually make the first connection over HTTP/1.1 or HTTP/2; when the server advertises `h3` via Alt-Svc, the client tries HTTP/3 (QUIC over UDP) to the same origin on the next (or a parallel) connection. So HTTP/3 is bootstrapped through this header without a separate DNS record (an HTTPS/SVCB DNS record is an even earlier alternative).
`ma` (max-age) sets how long to trust and cache the advertisement, and `persist=1` specifies whether to keep it across network changes. Multiple alternatives can be comma-listed, and the special value `Alt-Svc: clear` immediately discards all previously advertised alternatives (useful when rolling back a problematic h3).
The core benefit is performance. HTTP/3 sets up connections fast on QUIC (0-RTT/1-RTT) and mitigates head-of-line blocking, so guiding clients to it via Alt-Svc reduces latency on repeat visits and follow-up requests. To let the server know a client connected to the advertised alternative, the request may carry an Alt-Used header, useful for routing and validation.
Alt-Svc: <protocol-id>="<host>:<port>"; ma=<seconds>[; persist=1] | cleare.g. Alt-Svc: h3=":443"; ma=86400
<protocol-id>="<host>:<port>" | The protocol and location of the alternative service: `h3` (HTTP/3), `h2` (HTTP/2), etc. An empty host means the same host. |
ma=<seconds> | max-age: how long (in seconds) the alternative may be cached and trusted. |
persist=1 | Whether to keep this entry across network changes. |
clear | Invalidates all previously advertised alternative services. |