On this page
An Alt-Svc change can make a browser try a different network endpoint for an existing origin. The page URL may stay the same while the advertised host, port, or protocol changes. To test Alt-Svc URL changes safely, compare the headers first, then verify which endpoint the client actually connects to—including what happens when that endpoint is unavailable.
This workflow uses fictional domains and addresses. Replace them with authorized test systems. The commands have not been executed for this article. RFC 7838 and current browser and server or CDN documentation were not available for review here; check those sources and verify support for your specific versions before publishing or releasing a change.
Key Takeaways
- Record the page URL, origin, advertised alternative host, port, protocol, and lifetime separately.
- Compare before-and-after headers under equivalent routing and request conditions. A syntactically plausible header does not prove the endpoint works.
- Use browser or network evidence to confirm the selected protocol and destination; test both fresh and previously used client profiles.
- Check alternative endpoint reachability, stale advertisements, fallback, and differences between staging and production.
- Revalidate the result after release and prepare a rollback that accounts for clients with cached advertisements.
Define the change and its test boundary
Alt-Svc advertises an alternative service for an origin; it does not itself change the URL shown in the address bar. For example, a response from https://www.example.com/checkout might advertise:
Alt-Svc: h3="alt.example.com:8443"; ma=60
Here the page URL is https://www.example.com/checkout, while the advertised alternative has protocol identifier h3, host alt.example.com, and port 8443. The ma value expresses the advertised lifetime in seconds. An authority such as ":443" uses the origin's host with the advertised port; it is not a relative page URL.
Before testing, make a record like this for both configurations:
| Field | What to record |
|---|---|
| Page URL and origin | Full requested URL; scheme, hostname, and port of its origin |
| Response | Status, Alt-Svc field value, timestamp, and any redirect location |
| Alternative | Protocol identifier, host, port, and advertised lifetime |
| Test conditions | Environment, edge or backend selected, client version, network, and relevant request headers |
| Observed connection | Destination, port, transport and application protocol, and evidence source |
If the response has multiple Alt-Svc fields or alternatives, record all of them. Also identify where the header is set: an application, reverse proxy, edge configuration, or a combination. A second layer can overwrite or append a value.
Advertisement
Capture the header before and after
Take a baseline before changing the configuration. Then capture the candidate response with the same URL, method, client, and relevant request headers. For a controlled edge comparison, the following example pins the origin hostname to two fictional IPv4 addresses. It retains the URL hostname for HTTPS rather than requesting an IP address as the URL.
# Replace these documentation addresses and URL with your authorized test targets.
URL='https://www.example.com/checkout'
HOST='www.example.com'
BEFORE_IP='192.0.2.10'
AFTER_IP='192.0.2.11'
curl --http1.1 --noproxy '*' \
--resolve "$HOST:443:$BEFORE_IP" \
--dump-header before.headers --output /dev/null \
"$URL"
curl --http1.1 --noproxy '*' \
--resolve "$HOST:443:$AFTER_IP" \
--dump-header after.headers --output /dev/null \
"$URL"
cat before.headers
cat after.headers
Run this in a shell with curl installed. The addresses must point to comparable, reachable test instances that serve a certificate valid for the origin hostname. Do not disable certificate verification to make the comparison pass. If your CDN does not expose individually pinnable nodes, use its documented test routing or a controlled before-and-after deployment instead.
The commands capture a GET response without automatically following redirects. Check the status and every relevant header, not only the first matching line: a redirect can have its own Alt-Svc value, and the final page can have another. If the page redirects, capture and evaluate each hop separately. Make sure authentication, cookies, compression, geographic routing, proxy use, and cache state do not unintentionally differ between captures.
The comparison answers what was advertised, not whether a browser used the alternative. Confirm the resulting value against RFC 7838, the relevant protocol specification, and your server or CDN documentation, including any product-specific rules for emitting or overriding the field.
Verify the alternative connection
Use a browser and network path representative of the intended rollout. First confirm in the browser vendor's current documentation that the version and platform support the advertised protocol and how to inspect its connections. Record the version, operating system, test network, and any proxy or VPN. Support and diagnostic interfaces can differ by browser and release.
- Start with a fresh client profile. Open the page and inspect the response headers in developer tools or a network capture. Confirm that the expected origin response contains the candidate advertisement.
- Make subsequent requests to the same origin. Inspect the browser's connection or protocol diagnostics and, where available, correlate them with edge or alternative-endpoint logs. A first request can use the original endpoint before the client has learned the advertisement.
- Confirm the destination and protocol. Record evidence that the connection reached the advertised host and port and used the intended application protocol. A protocol label alone may not identify the remote endpoint; use suitable browser diagnostics, authorized packet capture, or server-side connection logs to corroborate it. Account for proxies, NAT, and connection reuse when interpreting addresses.
- Check security and content. The alternative must be able to authenticate service for the original origin. Investigate certificate or handshake failures, and verify that the requested resource behaves as intended. Do not treat a successful connection to an unrelated service on the port as a pass.
- Repeat on target clients and networks. Include representative browsers, operating systems, IPv4 and IPv6 paths where applicable, and any production proxy or enterprise network that matters to the release.
For an h3 alternative, include UDP reachability in the network checks. DNS resolution, firewall policy, load balancer listeners, TLS configuration, and the alternative service itself can all affect whether the connection succeeds. A browser may instead use the original service; a page loading successfully is not proof that the alternative was used.
Advertisement
Test stale advertisements and failure paths
Use a previously used browser profile as well as a fresh one. Capture its behavior after changing the advertisement: an existing profile may retain an earlier alternative or reuse an existing connection. Record when the old value was received, its advertised lifetime, and which endpoint the client actually contacts. Repeat after the relevant lifetime has elapsed; do not assume every client has discarded its state merely because the server now sends a new header.
In an isolated test environment, make the advertised endpoint unreachable or stop its listener. Observe whether the page remains usable, how long recovery takes in that client, and which connection is used afterward. Restore the endpoint after the test. Also check an endpoint that resolves but cannot complete the intended secure connection. Do not deliberately disrupt production users to perform these checks.
A response can use Alt-Svc: clear to signal that alternatives for the origin should be cleared. Test this behavior with your target clients rather than assuming it instantly reaches every browser: a client must receive the relevant response, and existing connections or offline clients complicate rollback. Removing the header alone does not necessarily erase an advertisement a client already stored. Keep the old endpoint operational during a transition where practical, and set a rollback window based on observed client behavior and advertised lifetimes.
Compare staging with production
A staging pass is useful only if the relevant conditions match. Before release, compare:
- Origin and certificates: production hostname, certificate coverage, and any origin-specific edge rules.
- DNS and addressing: alternative hostname answers, IPv4 and IPv6 availability, and production resolver behavior.
- Network path: firewalls, UDP policy where applicable, load balancers, proxies, and geographic routing.
- Configuration layers: header injection, caching, redirects, and differences among edge locations or backends.
- Clients: browser versions and network environments representative of actual users.
Where an exact staging replica is impossible, document the gap and run an authorized production canary with a limited scope. Capture the same header and connection evidence there. Monitor failures and fallback as well as successful alternative connections, and retain a way to revert both the advertisement and endpoint configuration.
Common Mistakes
- Treating the alternative authority as a page URL. Host and port describe a connection destination; the original origin and page path still matter.
- Stopping after a header check. A valid-looking field cannot demonstrate DNS, transport, TLS, or application behavior.
- Testing only a clean profile. This misses clients holding an older advertisement or reusing a connection.
- Assuming a loaded page used the alternative. Fallback or an existing connection can hide an unreachable endpoint.
- Comparing unlike responses. Redirects, caches, authentication, edge selection, and request headers can explain apparent configuration differences.
- Removing the old endpoint immediately. Clients that previously received an advertisement may continue attempting it.
Best Practices
Agree on pass criteria before the change: the expected header at each relevant origin, evidence of actual connections to the alternative, acceptable failure and fallback behavior, and a rollback owner. Preserve captures with timestamps and client details so the team can distinguish an advertisement problem from an endpoint or network problem.
Before the production decision, consult RFC 7838 and current documentation for each browser and the actual server or CDN involved. Verify version-specific support, configuration syntax, and diagnostic methods; none of those current details were independently verified for this article.
Conclusion
A safe Alt-Svc release requires two separate checks: the origin advertises the intended alternative, and representative clients can actually use it. Compare headers under controlled conditions, then test real connections, stale state, failure, and rollback before expanding the rollout.
What would your domain sell for?
A free TidyURLs account unlocks the Domain Estimator. It prices a name from 191,011 real domain sales.