More
More
505 HTTP Version Not Supported
The server does not support the HTTP version used in the request.
- Code
505- Reason phrase
- HTTP Version Not Supported
- Class
- 5xx Server error
- Defined in
- RFC 9110 section 15.6.6
- Cacheable by default
- No
What it means
Server error: the request may be fine, but the server failed to carry it out.
When a server should send it. When the server will not use the major HTTP version in the request. Rare in practice: servers negotiate HTTP/2 and HTTP/3 during the TLS handshake and fall back to HTTP/1.1.
Common causes. Very old or very new clients meeting a strict server.
What to do. Use HTTP/1.1, which every server supports.
How clients and crawlers treat it
Browsers and HTTP clients. Clients treat it as a server error.
Google Search. Googlebot treats 5xx responses as a sign of trouble and temporarily slows its crawl rate. Already indexed URLs are kept at first, but are dropped if the errors continue. Source: Google Search Central, How HTTP status codes, and network and DNS errors affect Google Search.
Caching. Not cacheable by default (RFC 9110 section 15.1 does not list it). A cache stores it only when the response says so with Cache-Control or Expires.
Example response
HTTP/1.1 505 HTTP Version Not Supported Content-Type: text/plain; charset=utf-8 HTTP Version Not Supported
How to send 505
location /example {
return 505;
}
RewriteEngine On RewriteRule ^example$ - [R=505,L]
http_response_code(505); echo 'HTTP Version Not Supported'; exit;
res.writeHead(505, { 'Content-Type': 'text/plain' });
res.end('HTTP Version Not Supported');
# in a view function return 'HTTP Version Not Supported', 505
Change the paths to suit. In nginx, add_header needs always to apply to error responses.
Related codes
- 426Upgrade RequiredThe server will only answer over a different protocol, named in the Upgrade header.
- 501Not ImplementedThe server does not support the method or feature the request needs.
- 400Bad RequestThe server could not understand the request.
All status codes · All 5xx codes
Names and numbers from the IANA HTTP Status Code Registry. Google Search behaviour as documented by Google Search Central.