How to Check an Alt-Svc Header and What It Tells a Browser

Learn how to check an Alt-Svc header, interpret its protocol, host, port, and lifetime, and verify whether a browser used the advertised service.

Published
Reading time
6 min read
How to Check an Alt-Svc Header and What It Tells a Browser
On this page

An Alt-Svc response header tells a browser about another network service it may use for the same origin. It is not a redirect, and seeing the header does not prove that the browser used the advertised service. This guide shows how to check the header, read its fields, and investigate the connection separately.

Key Takeaways

  • Alt-Svc advertises an alternative protocol and authority—host and port—for an existing origin, not a replacement page URL.
  • A response can advertise HTTP/3 even if that response arrived over another protocol.
  • The ma parameter specifies an advertised lifetime in seconds; it does not guarantee that a browser will use the alternative for that long.
  • Check the browser’s actual connection details and server-side evidence separately from the header.

How to Check an Alt-Svc Header

Run this command against an endpoint you operate or are authorized to inspect. Replace example.com with its hostname:

curl -sS -D - -o /dev/null 'https://example.com/'

-D - writes response headers to standard output, while -o /dev/null discards the response body. On systems without /dev/null, use an appropriate local output destination instead. Look for a header named Alt-Svc; header names are case-insensitive.

For illustration, suppose a response from https://example.com/products contains:

Alt-Svc: h3="alt.example.com:443"; ma=3600

Read it as follows:

ComponentMeaning
h3The advertised application protocol is HTTP/3.
alt.example.comThe alternative service’s host.
443The alternative service’s port.
ma=3600The alternative is advertised with a maximum age of 3,600 seconds.

This is an illustrative header, not a claim about the response from example.com. The command has not been executed for this article. A real response may contain a different value, multiple alternatives, or no Alt-Svc header at all.

You can also inspect the response in your browser’s developer tools: open the Network panel, request the page, select the relevant request, and examine its response headers. Reload if necessary with the panel open. Redirects can produce multiple requests, so inspect the particular response whose origin and headers you want to diagnose.

Advertisement

Alternative Authority vs. Page URL

In the example above, the page URL remains https://example.com/products. Its origin is still based on https, example.com, and the effective port. The path /products is part of the requested resource; it is not part of the alternative authority.

The advertised authority alt.example.com:443 identifies where the alternative service can be contacted. It is not a complete URL: it has no scheme, path, query, or fragment. A client using it still requests resources for the original origin, and the alternative service must be able to authenticate for that origin. The header alone does not authorize sending origin traffic to an endpoint that fails the relevant security checks.

An advertisement may omit the alternative hostname. For example, h3=":443" uses the origin’s hostname with the specified alternative port. This also describes a service endpoint, not a new page address.

An Advertisement Is Not a Connection

The response carrying Alt-Svc can arrive over an existing connection. A browser may consider the advertised alternative for later requests, but may also continue using an existing connection, find the alternative unreachable, reject it, or make a different choice. HTTP/3 uses QUIC over UDP, so network policy and deployment configuration can affect reachability.

To investigate what happened:

  1. Record the page URL, response header, time, and browser version. Check which response supplied the header, especially after redirects.
  2. In the Network panel, enable the protocol or connection-related columns if your browser provides them. Make a subsequent request and inspect the protocol actually reported for that request.
  3. Where available, inspect the remote address or browser network diagnostics. A reported address may belong to a proxy, CDN, or other intermediary, so interpret it in the context of your deployment.
  4. Correlate the request with logs or telemetry from the intended alternative endpoint. A reported HTTP/3 connection alone does not establish that a particular backend server handled the request.

Developer-tool labels and available diagnostics vary by browser and version. Server logs, browser diagnostics, and the response header answer different questions; use them together rather than treating any one as definitive.

Advertisement

Test Header Changes and Browser Sessions

Use an environment you control and record each change. Start with the header visible on the intended origin, then compare subsequent requests with the alternative endpoint’s connection logs. Change one condition at a time—for example, the advertised authority, lifetime, or availability of the alternative—and repeat the observation.

Test both a fresh browser profile and a later session. A browser may retain alternative-service information or reuse connections, so closing a tab, reloading a page, or changing the server header does not necessarily produce an immediate, identical result across browsers. Cached HTTP responses, service workers, proxies, CDNs, and load balancers can also make the header seen by a browser differ from the one emitted by an origin server.

A server can advertise Alt-Svc: clear to indicate that alternatives for the origin should be cleared. Do not assume every browser will visibly switch connections immediately after receiving it: check the actual client and deployment. For a clean comparison, use a separate profile or the browser’s documented network-state clearing procedure, and verify that the request reached the intended environment.

When comparing staging and production, inspect the header at the browser-facing edge as well as the application server. Confirm that the advertised host and port are reachable from the client network and that the alternative endpoint is configured to authenticate the original origin. Avoid copying a staging authority into production by accident.

Common Mistakes

  • Treating the authority as a URL. alt.example.com:443 does not specify a page or redirect the address bar.
  • Assuming the header describes the current connection. It advertises an option; inspect the protocol and connection used by a later request.
  • Checking only the application server. An intermediary may add, remove, or alter the browser-facing header.
  • Assuming a reload resets state. Connection reuse, stored alternatives, and caches can affect repeated tests.
  • Ignoring failed alternatives. An advertised endpoint can be unreachable or fail authentication even when the header is syntactically present.

Best Practices

Keep a record of the exact origin, response, advertised authority, browser version, network path, and observation time. Use a controlled endpoint and correlate client observations with edge or server logs. When changing an advertisement, allow for client state and test with a fresh profile as well as an existing one.

RFC 7838 and current browser documentation were not available for consultation in this run. Verify browser-specific controls, persistence, and diagnostics against the documentation for the browser and version you are testing.

Conclusion

Checking Alt-Svc reveals what alternative service an origin advertises, not where the browser necessarily connected. Read the protocol, authority, and lifetime first; then use browser diagnostics and endpoint telemetry to verify actual behavior.

What would your domain sell for?

A free TidyURLs account unlocks the Domain Estimator. It prices a name from 191,011 real domain sales.