426 Upgrade Required

The HTTP 426 status code means a server doesn’t want to accept the current protocol and wants the client to switch to a different protocol (for example, HTTP/1.1 to WebSocket) or a newer version of the same protocol (for example, HTTP/2 to HTTP/3).

The server responds with the Upgrade header indicating the protocol they are willing to accept:

HTTP/1.1 426 Upgrade Required
Connection: Upgrade
Upgrade: WebSocket


A server is supposed to return 426 Upgrade Required when the WebSocket handshake fails due to an incorrect protocol version (as presented in the Sec-WebSocket-Version HTTP header).

Typically, a WebSocket server will respond with the supported version(s) of the protocol:

Sec-WebSocket-Version: 13, 8, 7

See also