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.
Example:
HTTP/1.1 426 Upgrade Required
Upgrade: HTTP/3.0
Connection: Upgrade
Content-Length: 53
Content-Type: text/plain
This service requires use of the HTTP/3.0 protocol.
- 1 Upgrade RFC7230 Section 6.7
- Source: RFC7231 Section 6.5.15
426 CODE REFERENCES
Rails HTTP Status Symbol :upgrade_required
Symfony HTTP Status Constant Response::HTTP_UPGRADE_REQUIRED
.NET HttpStatusCode.UpgradeRequired
Rust http::StatusCode::UPGRADE_REQUIRED
Go http.StatusUpgradeRequired
Python 3.5+ http.HTTPStatus.UPGRADE_REQUIRED
Apache HttpComponents Core org.apache.hc.core5.http.HttpStatus.SC_UPGRADE_REQUIRED
Angular @angular/common/http/HttpStatusCode.UpgradeRequired
426 status code example
Here’s an example request and response for a 426 status code:
Request
GET /index.html HTTP/1.1
Host: www.example.com
Connection: keep-alive
Upgrade: TLS/1.0
Response
HTTP/1.1 426 Upgrade Required
Date: Wed, 14 Jul 2021 17:00:00 GMT
Server: Apache
Upgrade: TLS/1.0, HTTP/1.1
Connection: Upgrade
Content-Length: 73
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.
Additional resources
- Learn about web development
- Learn about SEO
- Web development services from WebFX
- SEO services from WebFX
- MDN Web Docs
- W3Schools
Marketing Tips for Niche Industries
- Tourism & Hospitality Statistics
- Travel and Tourism Marketing Budget
- Urgent Care Marketing Ideas: 5 High-ROI Tactics
- WebFX: Your Education Digital Marketing Agency
- Why Auto Part Retailers Need Digital Marketing
- Why Digital Marketing is Essential for Auctioneers
- Your Guide to Digital Marketing for Exercise Equipment Companies
- Your Guide to Digital Marketing for Industrial Repair Companies
- Vision Care Industry Statistics
- 6 Best Heavy Equipment Marketing Agencies