HTTP status code · Server errors (5xx)
505 HTTP Version Not Supported
505 HTTP Version Not Supported means the server does not support, or refuses to support, the major HTTP version used in the request. The most common cause is a hand-written or misconfigured client putting something like HTTP/2.0 or HTTP/0.9 in an HTTP/1.x request line.
| Class | 5xx, Server errors |
|---|---|
| Defined in | RFC 9110 §15.6.6 |
| Cacheable by default | Only with explicit Cache-Control or Expires |
| Safe to retry | Only with a different HTTP version, normally HTTP/1.1 |
| Relevant headers |
|
What 505 means
RFC 9110, section 15.6.6, says a 505 means the server is unable or unwilling to complete the request using the same major version as the client, and that the response should explain why and which protocols it does support. Only the major version counts: an HTTP/1.1 server has to accept HTTP/1.0 requests.
Browsers essentially never trigger it, because HTTP/2 and HTTP/3 are negotiated during the TLS handshake (ALPN) rather than written into a text request line. Where 505 does show up is raw clients and scanners. Go's net/http, for example, answers 505 "unsupported protocol version" to any request line claiming HTTP/0.x or HTTP/2 and above, except the HTTP/2 connection preface. AWS load balancers return it when an HTTP/2 request arrives on a connection set up as HTTP/1.
Common causes
If you are visiting the site
- Very unlikely in a normal browser. If you see it, an old proxy, browser extension or network appliance on your side may be rewriting requests.
If you run the server
- A custom client or script writes the request line by hand with a wrong version string, such as "HTTP/2.0" over a plain TCP socket.
- A proxy or load balancer forwards HTTP/2 frames to a backend that expects HTTP/1.1, or the reverse.
- A security scanner probing with obsolete or invented versions.
How to fix it
If you are visiting the site
- Try another browser or network, and disable extensions or proxies that modify traffic.
If you run the server
- Use a real HTTP library instead of writing request lines by hand, and let it negotiate HTTP/2 through ALPN.
- Check the protocol settings between proxy and backend: for example the target group protocol version on an AWS ALB, or proxy_http_version in nginx, which only speaks HTTP/1.0 or 1.1 to upstreams.
How to diagnose 505
Your application code does not send 505; the HTTP server library rejects the request line before any handler runs.
# Reproduce against a local Go server: HTTP/3.0 in an HTTP/1 request line
printf 'GET / HTTP/3.0\r\nHost: localhost\r\n\r\n' | nc localhost 8080
# HTTP/1.1 505 HTTP Version Not SupportedCommonly confused with
- 505 vs 426
- 426 Upgrade Required tells the client to switch to a different protocol before retrying; 505 just refuses the version that was used.
- 505 vs 400
- A version string that is not even well formed, such as "HTTP/one", usually gets a 400; 505 is for a well-formed version the server will not speak.
Frequently asked questions
- Can a browser get a 505 error?
- Practically never. Browsers negotiate HTTP/2 and HTTP/3 through TLS (ALPN) and fall back to HTTP/1.1 cleanly. A 505 in a browser points to something in between, such as a misbehaving proxy, rewriting the request.
- Does an HTTP/1.1 server have to accept HTTP/1.0?
- Yes. The 505 check is about the major version only. An HTTP/1.1 server must accept HTTP/1.0 requests and answer them in a way HTTP/1.0 clients understand.
- How do I test which HTTP version a server supports?
- Use curl with --http1.1, --http2 or --http3 and add -v to see what was negotiated. curl reports the protocol in the response status line, such as "HTTP/2 200".
Last reviewed by Arielton Oberek.