Alt-Used
The HTTP Alt-Used request header identifies the alternative service in use when a client connects to a server through an alternative protocol or endpoint advertised in Alt-Svc.
Usage
The Alt-Used header is part of the HTTP Alternative Services framework. When a server sends an Alt-Svc response header advertising alternative endpoints (like HTTP/3 on a different port or HTTP/2 at a different hostname), the client stores this information and attempts to use the alternative for future requests to the same origin.
Once the client connects through an alternative service, the
browser includes the Alt-Used header in the request to inform
the server which alternative was selected. The header value
contains the host and port of the alternative service, formatted
as hostname:port or hostname when using the default port
for the protocol.
The header serves three purposes. First, alternative services detect connection loops by comparing the Alt-Used value against their own advertised endpoints. Second, load balancers differentiate alternative service traffic from direct origin connections. Third, servers track which alternatives are working in production, aiding debugging and capacity planning.
The Alt-Used value differs from the Host header when an alternative is active. The Host header continues to reference the original origin, while Alt-Used identifies the actual network endpoint handling the request.
Values
hostname:port
The value is a hostname and port combination representing the alternative service selected by the client. The format matches the authority portion advertised in the Alt-Svc response.
For default ports (443 for HTTPS, 80 for HTTP), the value omits the port number and contains only the hostname.
Example
A client connects to a server using an HTTP/3 alternative service on port 443 as advertised by the origin. The Alt-Used header indicates the specific endpoint in use.
Alt-Used: example.re:443
When the alternative uses the default HTTPS port, the port number is often omitted.
Alt-Used: example.re
A server advertising HTTP/2 at a different hostname sees the alternative hostname in Alt-Used when clients connect through the advertised endpoint.
Alt-Used: alt.example.re
Takeaway
The Alt-Used request header informs servers which alternative service endpoint the client selected from the Alt-Svc advertisement, enabling loop detection, traffic differentiation, and operational monitoring.