The 426 Upgrade Required status code indicates that the server refuses to process the request using the current protocol. The client must upgrade to a different protocol (for example, switching from HTTP/1.1 to a newer version) before retrying the request.
Upgrade headerWhen a client sends a request using an unsupported or outdated protocol, the server may respond with status code 426 and include headers that specify which protocol(s) are acceptable.
// HTTP response indicating protocol upgrade is required
HTTP/1.1 426 Upgrade Required
Upgrade: HTTP/2.0
Connection: Upgrade
// Node.js example sending a 426 response
res.status(426);
res.set("Upgrade", "HTTP/2.0");
res.send("Please upgrade your protocol");
The client receives a 426 response and understands that the request will only succeed after switching to the protocol specified in the Upgrade header.
Imagine a browser trying to establish a connection over an outdated protocol. Click below to simulate a protocol handshake.
Upgrade headerUpgrade header