Connection reused across hostnames with different virtual host settings
- Where to look
- Apache or nginx virtual host config for each hostname
- Fix
- Give hosts that share an IP and port the same certificate, protocol and cipher settings
A 421 means the request reached a server that cannot answer for that hostname. See the HTTP/2 connection reuse cause, the Apache SNI fix and what a visitor can try.
A 421 Misdirected Request error means the request reached a server that cannot give an authoritative answer for that hostname. It is common when a browser reuses one HTTPS connection for several hostnames and the server's virtual hosts are set up differently. Reload to open a new connection; site owners should align their SSL and virtual host settings.
Four quick questions, then a straight answer.
From your answers, this is quietly costing you traffic and nobody has the hours to chase it. Scaplet finds every affected page, drafts the fixes and tracks how AI answers mention you.
A data platform shipped 46 fixes without a ticket.
This looks handled. Re-check after a redesign, a migration or a big content push; that is when it breaks.
Your site is small and you have the time. Work through the steps on this page, starting with the pages that get the most traffic.
A client that gets one "MAY retry the request, whether or not the request method is idempotent, over a different connection". MDN describes a typical case: with a wildcard certificate (*.example.com), a browser may reuse one connection for abc.example.com and def.example.com, and the server may answer 421 for one of them. RFC 9113 (HTTP/2) says connections MAY be reused for requests with different URI authority components, and that a server that does not wish clients to reuse connections can send a 421 (Misdirected Request) in response. So the cause is usually the origin or a gateway in front of it, and the trigger is how the browser reuses connections.
Reload the page. A reload may open a new connection, and RFC 9110 allows a client to retry a 421 over a different connection. If the error stays, close the browser tab, try a private window or another browser, and check that the address is typed correctly. If it fails for everyone, the site owner has to fix the server configuration.
Find which hostname returns 421 and which one the connection was first opened for. A hostname that works on a fresh connection but fails after another site was visited points to connection reuse.
The Apache docs say SSLVHostSNIPolicy sets the policy for checking that the virtual host named by the Host header is compatible with the one picked by SNI, and that an incompatible request gets "an HTTP error response with status code 421". It is available in httpd 2.4.66 and later.
The default secure policy and the authonly policy compare specific parts of the SSL configuration: the server certificate and key plus protocol and cipher restrictions, and client verification and authentication settings. Make them identical for virtual hosts that share an IP and port.
Confirm ServerName and ServerAlias (Apache) or server_name (nginx) include every hostname that the certificate covers and that you want served.
If a CDN or load balancer sits in front, test the origin directly with curl --resolve to see whether the 421 comes from the origin.
curl -i --resolve abc.example.com:443:203.0.113.10 https://abc.example.com/# Keep the default secure policy and make vhost SSL settings match.
SSLVHostSNIPolicy secure4 questions people ask next, answered from the sources on this page.
The request reached a server that cannot or will not give an authoritative answer for the hostname in the URL.
Reload to open a new connection. If you run the site, make the SSL settings of virtual hosts on the same IP and port match, and check that the Host header matches a configured name.
A browser may reuse one connection for several hostnames the certificate covers. If the server treats those hostnames differently, it answers 421 for one of them.
No. RFC 9110 says a proxy MUST NOT generate a 421. An origin server or a gateway acting for the origin sends it.
Run the free audit, then approve the fixes. Every change can be undone.