426 Client Error ๐Ÿ“‹

426 Upgrade Required: Switch to a Different Protocol

Last updated: June 28, 2026 โ€ข 5 min read

โœฆ The Golden Answer: The 426 Upgrade Required status code indicates that the server refuses to process the request using the current protocol and requires the client to upgrade to a different protocol (e.g., from HTTP/1.1 to HTTP/2, or from HTTP to WebSocket). The server sends an Upgrade header with a list of supported protocols, and the client must retry the request using one of those protocols. This is commonly used when a server wants to enforce HTTP/2 or WebSocket connections.

How Protocol Upgrades Work

The client sends a request with a Connection: Upgrade header and an Upgrade header listing the protocols it supports. If the server requires a different protocol, it responds with 426 Upgrade Required and an Upgrade header listing the acceptable protocols. The client should then retry the request using the new protocol.

Common Causes of 426 Errors

CauseExampleHow to Fix
HTTP/2 requiredServer only accepts HTTP/2, client uses HTTP/1.1.Client must use HTTP/2 (or ALPN negotiation).
WebSocket requiredServer expects a WebSocket upgrade for a realโ€‘time endpoint.Client must send a WebSocket upgrade request.
HTTP/3 requiredServer uses HTTP/3 (QUIC) and rejects HTTP/1.1 or HTTP/2.Client must support HTTP/3.
Server misconfigurationServer incorrectly requires an upgrade.Check server configuration; ensure clients can upgrade.

Example: 426 Response

A server requires HTTP/2, but the client connects with HTTP/1.1:

GET /api/data HTTP/1.1 Host: example.com Connection: upgrade Upgrade: h2 HTTP/1.1 426 Upgrade Required Upgrade: h2 Content-Type: text/html <html> <body> <h1>426 Upgrade Required</h1> <p>This server requires HTTP/2. Please upgrade your connection.</p> </body> </html>

How to Fix 426 Errors

  • If you're a client developer: Check the Upgrade header in the response and retry the request using one of the suggested protocols. For HTTP/2, you may need to use ALPN (Application-Layer Protocol Negotiation) during the TLS handshake. For WebSocket, send the appropriate Connection: Upgrade and Upgrade: websocket headers.
  • If you're a server administrator: Ensure your server supports the protocols you are advertising. For HTTP/2, configure your server correctly. Avoid requiring upgrades unless absolutely necessary, as they add latency.
  • If you're an endโ€‘user: This error is extremely rare in browsers, as they handle protocol upgrades automatically. If you see it, try updating your browser or refreshing the page.

Common Upgrade Protocols

  • h2 โ€“ HTTP/2 over TLS.
  • h2c โ€“ HTTP/2 over cleartext (nonโ€‘TLS).
  • websocket โ€“ WebSocket protocol.
  • h3 โ€“ HTTP/3 (over QUIC).
  • spdy โ€“ SPDY (predecessor to HTTP/2).

Frequently Asked Questions

Is 426 a client error or a server error?

It's a client error (4xx) because the client is using an unsupported protocol and must upgrade. The server is working correctly but refuses to serve the request over the current protocol.

Do all servers support 426?

No, it's relatively uncommon. Most servers simply support multiple protocols and use ALPN or the Upgrade header during the handshake, rather than rejecting with 426. However, some servers use it to enforce specific protocols.

Is 426 the same as 101 Switching Protocols?

No. 101 Switching Protocols is a success response indicating that the server agrees to switch protocols after the client's upgrade request. 426 Upgrade Required is an error response indicating that the server refuses to process the request unless the client upgrades.