HTTPfy

426 Upgrade Required

The server refuses the request over the current protocol and requires an upgrade named in the Upgrade header.

426 at a glance

Code
426
Name
Upgrade Required
Class
4xx Client error
Status
IANA-registered standard code
Defined in
RFC 9110, Section 15.5.22
Cacheable by default
No by default. Caches store it only when the response carries explicit freshness (Cache-Control max-age, s-maxage or Expires).

What 426 means

426 Upgrade Required tells the client it must switch protocols (for example to TLS, a newer HTTP version, or WebSocket) before the server will process the request. The response must include an Upgrade header naming the acceptable protocol(s).

What typically causes a 426

  • A plain HTTP GET to a WebSocket-only endpoint: the Node.js ws library answers 426.
  • Servers that require HTTP/2 or a newer API protocol version.
  • Some services returning 426 to clients using deprecated TLS or protocol versions.

Fix it on the server

  • Include Upgrade, e.g. Upgrade: websocket, and Connection: Upgrade.

Fix it as a client or visitor

  • Use a WebSocket client (ws:// or wss://) for WebSocket endpoints, or upgrade the client library.
  • Behind a proxy, make sure Upgrade and Connection headers are forwarded.

Headers that go with 426

HeaderRole
UpgradeRequired: protocols the server will accept.

Example response

HTTP/1.1 426 Upgrade Required
Upgrade: websocket
Connection: Upgrade
Content-Type: text/plain

Upgrade Required

Opens the HTTP headers tool with your URL filled in; it shows the status line and headers of every redirect hop.