426 Upgrade Required
The server refuses to serve this request over the current protocol and names, in the Upgrade header, what it will accept.
At a glance
- Status code
- 426 Upgrade Required
- Class
- 4xx, client error, the request itself is the problem
- Defined in
- RFC 9110
- Cacheable by default
- no
- Response body
- Should explain the required protocol.
In detail
Most often used to insist on a newer TLS version or to require a WebSocket connection for an endpoint that only exists there.
Include both Upgrade and Connection: Upgrade. A 426 without an Upgrade header tells the client nothing it can act on.
If a client suddenly gets 426 against an unchanged endpoint, an operator has raised the minimum TLS version. The client needs a newer runtime, not a code change.
Examples
HTTP/1.1 426 Upgrade Required
Upgrade: TLS/1.2, HTTP/1.1
Connection: UpgradeThings that catch people out
- HTTP/2 removed the Upgrade mechanism, so 426 cannot ask an HTTP/2 client to switch protocol on the same connection.
- Very old clients may not surface the Upgrade header at all, and will report an opaque failure.
Try it: HTTP Request Builder
Build a request with any method, headers and body, send it, and read the status line the server returns.
HTTP Request Builder
LOCAL · Browser-OnlyBuild and test HTTP requests with custom headers and body
Authentication
Headers
Generate Code
curl -X GET 'https://api.example.com/endpoint' \
-H 'Content-Type: application/json'Showing a sample URL. Enter your endpoint above to update the snippet.
Related HTTP status codes
All http status codes →101 Switching Protocols
The server agrees to change protocol on this connection, which in practice almost always means upgrading to WebSocket.
400 Bad Request
The server refused the request because it was malformed. The client must change something before retrying, because repeating the same bytes will fail.
505 HTTP Version Not Supported
The server refuses the major HTTP version used in the request line.
428 Precondition Required
The server requires the request to be conditional, and refuses an unconditional one to prevent a lost update.
429 Too Many Requests
The client has sent too many requests in a given period. The Retry-After header says how long to wait before trying again.
431 Request Header Fields Too Large
The request headers are collectively or individually too large. Oversized cookies are the usual cause.
Tools for this
- HTTP Request Builder Free online HTTP request builder - build and test HTTP requests with custom headers and body
- HTTP Headers Checker Free online HTTP headers checker - view HTTP response headers for any URL