What Is a 505 Status Code?
The server does not support, or refuses to support, the major version of HTTP that was used in the request message.
The server is indicating that it is unable or unwilling to complete the request using the same major version as the client, as described in Section 2.6 of RFC7230, other than with this error message. The server SHOULD generate a representation for the 505 response that describes why that version is not supported and what other protocols are supported by that server.
- Source: RFC7231 Section 6.6.6
505 CODE REFERENCES
Rails HTTP Status Symbol :http_version_not_supported
Go HTTP Status Constant http.StatusHTTPVersionNotSupported
Symfony HTTP Status Constant Response::HTTP_VERSION_NOT_SUPPORTED
Python2 HTTP Status Constant httplib.VERSION_NOT_SUPPORTED
Python3+ HTTP Status Constant http.client.VERSION_NOT_SUPPORTED
Python3.5+ HTTP Status Constant http.HTTPStatus.VERSION_NOT_SUPPORTED
.NET HttpStatusCode.HttpVersionNotSupported
Rust http::StatusCode::HTTP_VERSION_NOT_SUPPORTED
Java java.net.HttpURLConnection.HTTP_VERSION
Apache HttpComponents Core org.apache.hc.core5.http.HttpStatus.SC_HTTP_VERSION_NOT_SUPPORTED
Angular @angular/common/http/HttpStatusCode.HttpVersionNotSupported
505 status code example
Here is an example of a request and response that could result in a 505 HTTP Version Not Supported status code:
Request
PUT /example HTTP/2.0
Host: www.example.com
Content-Type: text/plain
Content-Length: 42
Hello, this is an example request body.
Response
HTTP/1.1 505 HTTP Version Not Supported
Date: Wed, 24 Mar 2023 14:28:00 GMT
Server: Apache/2.4.48 (Unix)
Connection: close
Content-Type: text/html; charset=iso-8859-1
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html>
<head>
<title>505 HTTP Version Not Supported</title>
</head>
<body>
<h1>HTTP Version Not Supported</h1>
<p>The server does not support the HTTP protocol version used in the request.</p>
</body>
</html>
In this example, the client is attempting to use the HTTP/2.0 protocol to send a PUT request to the server. However, the server only supports the HTTP/1.1 protocol, so it responds with a 505 HTTP Version Not Supported status code. The response also includes a message explaining that the server does not support the HTTP protocol version used in the request.
How to fix a 505 status code
If you receive a 505 HTTP Version Not Supported status code, it means that the HTTP protocol version used in the request is not supported by the server. Here are a few ways to address this issue:
- Check the protocol version: The first step is to ensure that you are using a supported protocol version. HTTP/1.1 is the most widely used protocol version, and most servers support it. If you are using a different version, try switching to HTTP/1.1 and see if the error goes away.
- Update the server: If the server does not support the protocol version you need, consider upgrading the server to a version that supports it. Alternatively, you can check if there is a patch or plugin available that adds support for the required protocol version.
- Use a proxy server: If you are unable to upgrade the server or switch to a supported protocol version, you can use a proxy server that supports the desired protocol version. The proxy server will handle the request on your behalf and forward the response back to you.
- Contact the server administrator: If you have tried the above solutions and still cannot resolve the issue, contact the server administrator for assistance. They may be able to provide additional information or suggest a workaround.
In general, resolving a 505 HTTP Version Not Supported error involves ensuring that the client and server are using compatible protocol versions.
What is the difference between a 500 status code and a 505 status code?
A 500 Internal Server Error status code indicates that the server encountered an unexpected condition that prevented it from fulfilling the request. This error can occur due to a variety of reasons, such as a programming error, an insufficient system resource, or a misconfiguration of the server.
On the other hand, a 505 HTTP Version Not Supported status code indicates that the server does not support the HTTP protocol version used in the request. This error occurs when the client attempts to use an HTTP protocol version that the server does not recognize or support.
Additional resources
- Learn about web development
- Learn about SEO
- Web development services from WebFX
- SEO services from WebFX
- MDN Web Docs
- W3Schools
Related Resources
- What is a 504 Status Code?
- What is a 506 Status Code?
- What is a 507 Status Code?
- What is a 508 Status Code?
- What is a 510 Status Code?
- What is a 511 Status Code?
- What is a 599 Status Code?
- VPS Hosting: What is It and What Does It Mean for Your Company?
- What is Web3 and Why is It Important to the Future of Marketing?
- What is ADA Compliance? (And What Does ADA Compliance Mean for Your Website?)
Marketing Tips for Niche Industries
- Trucking Website Design Services That Help You Grow Online
- Web Design for PPE Companies: 5 Sales-Boosting Design Tips
- Web Design for Exercise Equipment Companies: Browse Services & Get Tips
- Web Design for Storage Facilities: Launch a Revenue-Driving Site
- Web Design for Pressure Washing Companies
- Web Design for Restoration Companies (+4 Tips for Success)
- Web Design for Flooring Companies
- Web Design for Biotech Companies: How to Design a Biotech Site
- Web Design for Window and Door Companies: Inspire Your Site
- Web Design for Robotics