HTTP Headers
Alt-Used header
The HTTP Alt-Used request header identifies the alternative service currently in use, much like the Host HTTP header field specifies the host and port of the origin.
The intention behind this header is to enable alternative services to detect loops, differentiate traffic for load balancing, and generally ensure that the intended destination of traffic can be identified, as introducing this information after a protocol is already in use has proven problematic.
When a client utilizes an alternative service for a request, it can signal this to the server by using the Alt-Used HTTP header.
| Header category | Request header |
|---|---|
| Not allowed in request headers | No |
Syntax
Alt-Used: <host>:<port>
Directives
<host>- The domain name of the server.
<port>Optional- The TCP port number where the server is actively listening.
Example
Alt-Used: alternate.example.net
How to Modify Header using Requestly
Requestly is a powerful Chrome extension that allows you to modify HTTP headers, including the Alt-Used header. This is useful when you want to test how your server handles alternative services, such as HTTP/2 or HTTP/3 connections, during development or debugging. Steps to Modify the Alt-Used Header:
- Install and open the Requestly Chrome extension. You can find it on the Chrome Web Store.
- Create a new rule: Click on “Create Rule” and choose “Modify Headers” from the list of available rule types.
- Add a new header modification:
- Under “Action”, select “Add” or “Override”.
- In the “Header Name” field, enter Alt-Used.
- In the “Header Value” field, enter the alternative host and port being used (for example, example.com:443).
- Set the URL condition: Specify the URL or pattern where this header should apply (for example, https://your-api.com/*).
- Save the rule.
Once configured, Requestly will inject the Alt-Used header into all matching requests. This allows you to simulate scenarios where an alternative service endpoint is being used.
You might need to modify the Alt-Used header to test routing behavior, validate server handling of alternative services, or debug HTTP/2 and HTTP/3 setups without modifying your production infrastructure.
Table of Contents
- No headings found.





