The HTTP version isn’t supported.
When to use it
Rare; very old or very new protocol versions.
Common causes and fixes
Very rare in practice: the server rejects the HTTP version in the request line. Causes include a hand-written request with a typo such as HTTP/1.2, a client speaking HTTP/2 to a server that only understands HTTP/1.x, or the reverse. AWS ALB documents 505 for exactly that mismatch, for example an HTTP/2 request arriving on a connection it set up as HTTP/1.
Debug by forcing a version with curl --http1.1 or curl --http2 and seeing which one the server accepts, and check ALPN negotiation with openssl s_client -alpn h2 -connect host:443. Browsers negotiate HTTP/2 and HTTP/3 through ALPN and Alt-Svc, so they almost never trigger 505 themselves. The response should list which versions the server does support.
Server error (5xx)
5xx codes are server errors: the request may be fine, but the server or something behind it failed. These are worth alerting on.
What it looks like
HTTP/1.1 505 HTTP Version Not SupportedHow to send it
| Node.js / Express | res.status(505).end() |
|---|---|
| Python / Flask | return '', 505 |
| nginx | return 505; |
How to check it
curl -s -o /dev/null -w "%{http_code}\n" https://example.com/