| Status code | 505 |
|---|---|
| Status text | HTTP Version Not Supported |
| Category | 5xx Server Error |
| Response has body | Usually |
| Specification | RFC 9110 |
What does 505 HTTP Version Not Supported mean?
The server does not support the major HTTP version named in the request. It belongs to the 5xx Server Error class, which means the server failed to fulfil an apparently valid request. The problem is on the server side.
When do APIs return 505?
Seldom because of a real version mismatch. The common cause is a malformed request line: an unencoded space in the URL makes the server read part of the path as the version field. It also appears when a hand-written client sends a version string the server does not recognise.
How to fix a 505 HTTP Version Not Supported
Percent-encode the URL, replacing spaces with %20. If you are building requests by hand, send HTTP/1.1 on the request line. A standard client library never produces this on its own, so when it shows up, look at how the URL was assembled.
Reproduce a 505 response
The fastest way to understand a status code is to trigger one and read the full response. Open the
API tester and send a request to https://httpbin.org/status/505 — you will
see the 505 status along with every response header the server sent. Comparing those headers against
a working request is often what reveals the cause.
When you are debugging a real endpoint, check the response headers as carefully as the body, and confirm you are using the right HTTP method for the operation.
Related 5xx status codes
500 Internal Server Error
The server hit an unexpected condition and could not complete the request.
501 Not Implemented
The server does not support the functionality required to fulfil the request.
502 Bad Gateway
A server acting as a gateway or proxy received an invalid response from the upstream server.
503 Service Unavailable
The server is temporarily unable to handle the request.
504 Gateway Timeout
A gateway or proxy did not receive a timely response from the upstream server.
507 Insufficient Storage
The server cannot store the representation needed to complete the request.
See also
- 426 Upgrade Required — The server refuses to answer over the current protocol and names the one it wants instead.
References
- RFC 9110, 505 HTTP Version Not Supported — The specification that defines this status code.
- MDN: 505 HTTP Version Not Supported — MDN's reference page for this status code.