HTTP 426 Upgrade Required
HTTP 426 Upgrade Required means the server refuses the request over the current protocol and requires the client to switch to the protocol named in the…
Quick answer
HTTP 426 Upgrade Required means the server refuses the request over the current protocol and requires the client to switch to the protocol named in the Upgrade header, for example a newer TLS or HTTP version, or WebSocket.
Last updated · Maintained by FreeAIToolz · How we test
What does HTTP 426 Upgrade Required mean?
The server must send an Upgrade header listing the required protocol. It is commonly seen when a plain HTTP request hits a WebSocket-only endpoint or when a service enforces a minimum protocol version.
| Status code | 426 |
|---|---|
| Name | Upgrade Required |
| Class | 4xx Client Error |
| Defined in | RFC 9110 §15.5.22 |
| Cacheable by default | No, unless Cache-Control says so |
| Safe to retry automatically? | No: change the request first |
| Related headers | Upgrade, Connection: Upgrade |
What causes HTTP 426?
- A regular HTTP request to a WebSocket endpoint.
- A server requiring HTTP/2 or a newer TLS version.
How do I fix HTTP 426?
- Connect using the protocol in the Upgrade header (for example ws:// or wss:// for WebSocket endpoints).
What should a client do after HTTP 426?
Switch protocols and retry.
Does HTTP 426 affect SEO?
No SEO impact for normal pages.
Example 426 response
HTTP/1.1 426 Upgrade Required
Date: Mon, 01 Dec 2026 12:00:00 GMT
Upgrade: HTTP/2.0
Connection: Upgrade
Content-Type: application/json
{"error":{"status":426,"message":"Upgrade Required"}} How to return 426 Upgrade Required in code
Express (Node.js)
res.status(426).json({ error: 'Upgrade Required' }); Next.js route handler
return Response.json({ error: 'Upgrade Required' }, { status: 426 }); FastAPI (Python)
raise HTTPException(status_code=426, detail="Upgrade Required") PHP
http_response_code(426); Nginx
location = /example {
return 426;
} Other 4xx status codes
The request contains an error or cannot be fulfilled as sent. Fix the request before retrying.
- 400 Bad Request
- 401 Unauthorized
- 402 Payment Required
- 403 Forbidden
- 404 Not Found
- 405 Method Not Allowed
- 406 Not Acceptable
- 407 Proxy Authentication Required
- 408 Request Timeout
- 409 Conflict
- 410 Gone
- 411 Length Required
- 412 Precondition Failed
- 413 Content Too Large
- 414 URI Too Long
- 415 Unsupported Media Type
- 416 Range Not Satisfiable
- 417 Expectation Failed
- 418 I'm a teapot
- 421 Misdirected Request
- 422 Unprocessable Content
- 423 Locked
- 425 Too Early
- 428 Precondition Required
- 429 Too Many Requests
- 431 Request Header Fields Too Large
- 451 Unavailable For Legal Reasons
- 499 Client Closed Request
Frequently asked questions
Why does opening a WebSocket URL in the browser return 426?
426 vs 101?
Is 426 a client or server error?
Related
- 101 Switching Protocols HTTP 101 Switching Protocols means the server agrees to the client’s Upgrade request and switches the connecti.
- 400 Bad Request HTTP 400 Bad Request means the server cannot process the request because of a client error, such as malformed .
- 505 HTTP Version Not Supported HTTP 505 HTTP Version Not Supported means the server does not support the HTTP protocol version used in the re.
- Open the HTTP Status Codes Reference → Free, no signup.