HTTP Error 505, also known as "HTTP Version Not Supported," occurs when a server refuses to support the HTTP version used in the request. This issue typically arises due to outdated protocols, server misconfigurations, or incompatibilities between the client and the server. When a web server does not recognize or support the version of HTTP in the request, it returns a 505 HTTP Version Not Supported response. In this guide, we’ll show you how to fix HTTP Error 505 Version not Supported.
Error 505 Meaning
The HTTP 505 error means that the server does not support the HTTP version specified in the request.
-
If your client is using HTTP/1.0, the server may require HTTP/1.1 or later.
-
Servers often reject outdated HTTP versions due to security and performance reasons.
To learn more, you can check out our blog post on What are HTTP Status Codes.
What Causes HTTP Error 505?
Several factors can contribute to the HTTP Error 505 Version Not Supported issue, including:
-
Outdated Browser or Application: Some older browsers and applications do not support modern HTTP versions.
-
Incorrect Server Configuration: The web server may not be set up to handle the requested HTTP version.
-
Unsupported HTTP Methods: Some web applications enforce restrictions on HTTP versions, rejecting outdated ones.
-
Issues with Proxy Servers: Certain proxy servers and caching mechanisms may not be compatible with HTTP/1.0 or HTTP/2.0 requests.
-
Misconfigured APIs or Services: If an API only supports specific HTTP versions, sending an incompatible request can trigger the 505 HTTP error.
How to Fix HTTP Error 505 Version Not Supported
To learn how to Fix HTTP Error 505 Version not Supported error, follow these troubleshooting steps:
1. Upgrade Your Browser or Client Software
If you’re using an outdated browser or application, it may not support newer HTTP versions. Update your browser to the latest version and try accessing the website again.
2. Check Server Configuration
Web servers such as Apache, Nginx, and IIS allow administrators to configure supported HTTP versions. If the server is rejecting certain requests, updating its settings may resolve the issue.
For Apache, you can modify the httpd.conf file:
Protocols h2 http/1.1
This ensures that both HTTP/2 and HTTP/1.1 are supported.
For Nginx, update the configuration in the nginx.conf file:
http {
server {
listen 80 http2;
}
}
This allows the server to accept HTTP/2 requests.
3. Ensure the Client Uses a Supported HTTP Version
If a script or application is making HTTP requests using an outdated version, modify the request settings to use a supported HTTP version.
For example, in PHP, ensure that cURL is using HTTP/1.1:
$ch = curl_init();
curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
This prevents PHP applications from using unsupported HTTP versions.
4. Verify API and Web Service Requirements
If you’re integrating with an API, check its documentation to ensure it supports the HTTP version you're using. Some APIs only work with HTTP/1.1 or later.
5. Inspect and Configure Proxy Servers
Proxy servers or CDN services (like Cloudflare) may interfere with HTTP version compatibility. If you're using a proxy, adjust its settings to allow connections using modern HTTP versions.
For example, in Burp Suite, the 505 HTTP Version Not Supported Burp error may appear when a request fails due to an unsupported HTTP version. Configuring the tool to use a compatible version can resolve the problem.
6. Update Web Application Code
If a web application explicitly specifies an unsupported HTTP version, update the code to use a standard version.
For instance, in a Python requests library script:
import requests
headers = {'User-Agent': 'Mozilla/5.0'}
response = requests.get("https://example.com", headers=headers)
Ensure that your application is sending requests with an acceptable HTTP version.
How to Fix HTTP Error 505 Version Not Supported PHP
When using PHP, the error may occur if the server does not support HTTP/1.0 or HTTP/2.0. To fix it, force cURL or file_get_contents() to use HTTP/1.1:
Solution: Use cURL with HTTP/1.1
$ch = curl_init("https://example.com");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
$response = curl_exec($ch);
curl_close($ch);
Solution: Use file_get_contents() with a Custom Context
$options = [
"http" => [
"protocol_version" => 1.1
]
];
$context = stream_context_create($options);
$response = file_get_contents("https://example.com", false, $context);
Unsupported HTTP 1 Subversion in Response
This error appears when a web server does not recognize a specific subversion of HTTP. For example, some servers may support HTTP/1.1 but reject HTTP/1.0.
Solution:
-
Upgrade your request to HTTP/1.1 or HTTP/2.0 in your client settings.
-
Check the server's configuration to ensure it supports multiple HTTP versions.
505 HTTP Version Not Supported Burp
In Burp Suite, the 505 HTTP Version Not Supported error occurs when a request is sent using an incompatible HTTP version.
Solution:
-
Configure Burp Suite to use HTTP/1.1 instead of an older version.
-
Update the Proxy Options in Burp Suite to allow modern HTTP versions.
HTTP 506: Variant Also Negotiates
HTTP 506 is another error related to HTTP request handling. It means the server has a misconfiguration, leading to a loop when negotiating content variants.
Solution:
-
If you're a server administrator, update the configuration to resolve looping issues.
-
If you're a client, report the issue to the web administrator.
Failed to open stream: HTTP request failed HTTP/1.1 505 HTTP Version Not Supported
This error often appears in PHP applications when a request is sent with an unsupported HTTP version.
Solution:
Use cURL or stream_context_create() to force a compatible HTTP version, as shown earlier in the PHP section.
HTTP Error Codes Overview
While troubleshooting HTTP 505, you may encounter other HTTP errors:
-
400 Bad Request: The server could not understand the request.
-
403 Forbidden: The client does not have permission to access the resource.
-
404 Not Found: The requested page does not exist.
-
500 Internal Server Error: A generic server-side error.
-
502 Bad Gateway: The server received an invalid response from the upstream server.
-
505 HTTP Version Not Supported: The server does not support the requested HTTP version.
The HTTP 505 Version Not Supported error can be frustrating, but it is often resolved by updating browsers, adjusting server settings, modifying application requests, and verifying API compatibility. By following the troubleshooting steps on how to fix HTTP Error 505 Version not Supported outlined above, you can ensure smooth communication between clients and web servers, avoiding HTTP version mismatches.