426 Upgrade Required HTTP Status Code

Description

The HTTP status code 426 indicates "Upgrade Required." This response code is sent by a server to indicate that the client needs to switch to a different protocol, typically specified in the server's response headers, to continue the communication.

Here's a bit more detail on how it works and when it's used:

  • Purpose: The 426 status code is used in situations where the server refuses to process a request using the current protocol but might be willing to do so after the client upgrades to a different protocol. This is a way for servers to enforce certain communication protocols that offer better functionality or security.

  • Upgrade Header: The server includes an Upgrade header in the response to specify the required protocols to which the client must switch. This header contains one or more protocol names that the server supports.

  • Example Use Case: A common scenario for this status code's use is within web technologies that require more modern protocols for improved performance or security. For instance, a server might require an upgrade from HTTP/1.1 to HTTP/2 or from an insecure to a secure WebSocket connection (ws:// to wss://).

  • Client Action: Upon receiving a 426 status code, a well-behaved client should understand the necessity of switching protocols. If the client supports the required protocol(s), it can initiate a new connection using the specified protocol(s). If the client does not support any of the required protocols, it cannot proceed with the request.

This status code serves as a mechanism for servers to promote the use of more efficient or secure protocols and ensure that communications adhere to the server's requirements for processing.

Status

HTTP
426 Upgrade Required

Common Causes

Here are the common reasons a server might return a 426 status code:

  1. Protocol Upgrade Requirement: The server can return a 426 status code when it requires the client to upgrade to a more secure or appropriate protocol to continue processing the request. For example, a server might require upgrading from HTTP to HTTPS for enhanced security.

  2. Version Incompatibility: If the client is using an older version of the protocol that is no longer supported or is incompatible with the server's current configuration, the server might respond with a 426 status code, indicating that the client should upgrade to a newer version of the protocol.

  3. Server Policy or Configuration: Some servers might be configured to only accept connections over certain protocols or versions due to security policies, regulatory compliance, or other administrative reasons. If a client attempts to connect using a protocol or version that is not permitted, the server might return a 426 status code as a prompt for the client to upgrade.

  4. WebSockets Upgrade: In the context of establishing a WebSocket connection, the server might return a 426 status code if the initial handshake request from the client does not include the required Upgrade: websocket header. This indicates that the client needs to send the correct headers to upgrade the connection to a WebSocket.

When a server returns a 426 status code, it should also include an Upgrade header to indicate the required protocol(s) to which the client should upgrade. This provides the client with the information needed to initiate a new request using the appropriate protocol or version.

Browser Support

The following table will show you the current browser support for the 426 Upgrade Required HTTP status code.

Desktop
Edge Chrome Firefox Opera Safari
?????
Tablets / Mobile
Chrome Firefox Opera Safari Samsung Webview
??????

Last updated by CSSPortal on: 1st April 2024