What Is a 426 Status Code?
The server refuses to perform the request using the current protocol but might be willing to do so after the client upgrades to a different protocol.
The server MUST send an Upgrade header field in a 426 response to indicate the required protocol(s)1.
HTTP/1.1 426 Upgrade Required
This service requires use of the HTTP/3.0 protocol.
426 CODE REFERENCES
Rails HTTP Status Symbol
Symfony HTTP Status Constant
Apache HttpComponents Core
426 status code example
Here’s an example request and response for a 426 status code:
GET /index.html HTTP/1.1
HTTP/1.1 426 Upgrade Required
Date: Wed, 14 Jul 2021 17:00:00 GMT
Upgrade: TLS/1.0, HTTP/1.1
Content-Type: text/plain; charset=utf-8
This server requires the use of a secure connection. Please upgrade to TLS/1.0.
What causes a 426 status code?
A 426 status code is caused when a client is attempting to upgrade a connection to a newer version of a protocol, but the server is refusing to do so.
This can happen for several reasons, including:
- Incompatibility between the client and server versions of the protocol.
- The server may not support the requested version of the protocol.
- The server may be configured to only allow certain versions of the protocol to be used.
- The server may be experiencing technical issues or undergoing maintenance that prevents it from upgrading the connection.
In any case, the client will need to determine the reason for the 426 error and take appropriate action to resolve it, such as updating to a compatible version of the protocol or contacting the server administrator for assistance.
How to troubleshoot a 426 status code
Here are some ways to troubleshoot this error:
- Check for server configuration issues: The 426 status code occurs when the client requests an upgrade to a different protocol version, but the server can’t comply with it. In such a case, you can check the server configuration to ensure that it supports the requested protocol version. You can also check if the server is configured to support HTTP/1.1, which is required for protocol upgrades.
- Check for client-side issues: The 426 status code can also occur if the client is sending incorrect or unsupported upgrade headers. In such cases, you can check the client-side code to ensure that it’s sending the correct headers and supporting the protocol version that it’s requesting.
- Check for network issues: The 426 status code can also occur due to network connectivity issues. In such cases, you can check the network settings and ensure that the client and server are connected to the same network. You can also check for firewall or proxy settings that might be blocking the request.
- Update software versions: If the server or client is outdated, it may not support the latest protocol version requested. In such cases, updating the server or client software to the latest version may resolve the issue.
By following the above troubleshooting steps, you can identify and resolve the issue that’s causing the 426 status code.
- Learn about web development
- Learn about SEO
- Web development services from WebFX
- SEO services from WebFX
- MDN Web Docs