426
HTTPERRORNotable4xx Client ErrorHIGH confidence
Upgrade Required
Production Risk
Low. It clearly tells the client how to fix the issue. Modern clients (like browsers) often handle this negotiation automatically.
What this means
The server refuses to perform the request using the current protocol but might be willing to do so after the client upgrades to a different protocol. The server must send an 'Upgrade' header to indicate the required protocol(s).
Why it happens
- 1A server requires that clients use HTTP/2, but a client connects with HTTP/1.1.
- 2A service requires a secure connection (TLS/1.3) but the client attempts to use an outdated, insecure protocol.
- 3The server wants to switch to a completely different protocol, like WebSocket, but the initial request was not an Upgrade request.
How to reproduce
A client makes a request to an HTTP/2-only server using the older HTTP/1.1 protocol.
trigger — this will error
trigger — this will error
GET / HTTP/1.1 Host: h2-only.example.com
expected output
HTTP/1.1 426 Upgrade Required Upgrade: h2c
Fix
Upgrade the Protocol
WHEN The client receives this response.
Upgrade the Protocol
The client must re-initiate the request using one of the protocols specified in the 'Upgrade' header.
Why this works
Client-Side Logic
Sources
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev