HTTP 505 HTTP Version Not Supported: meaning and fixes
Meaning
HTTP 505 means the server does not support the request's HTTP version. Retry with a negotiated version such as HTTP/1.1 after checking the proxy.
HTTP 505 means the server does not support the HTTP version used in the request. RFC 9110 section 15.6.6 names the reason phrase “HTTP Version Not Supported”. The response is about the protocol version, not the URL, credentials or proxy exit. A client must choose a version the server supports, often by negotiating HTTP/2 or falling back to HTTP/1.1.
505 is uncommon on a normal browser connection. Many servers reject an invalid version earlier with 400, and a proxy may return 505 when it parses an HTTP/2 or HTTP/3 request it cannot forward. That makes the status useful in diagnostics, but unsafe as a generic “server is down” signal.
Reproduce it with a small HTTP/1 server
Python 3.15.0’s standard-library parser answers a request line that says HTTP/2.0 with 505. The listener is deliberately HTTP/1 only:
# plain.py
from http.server import BaseHTTPRequestHandler, HTTPServer
class H(BaseHTTPRequestHandler):
def do_GET(self):
self.send_response(200)
self.end_headers()
self.wfile.write(b"ok\n")
HTTPServer(("127.0.0.1", 8414), H).serve_forever()
$ printf 'GET / HTTP/2.0\r\nHost: x\r\n\r\n' | nc 127.0.0.1 8414
HTTP/1.0 505 Invalid HTTP version (2.0)
Server: BaseHTTP Python/3.15.0
Content-Length: 465
<p>Error code: 505</p>
<p>Message: Invalid HTTP version (2.0).</p>
$ printf 'PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n' | nc 127.0.0.1 8414
HTTP/1.0 505 Invalid HTTP version (2.0)
The capture was made with netcat and the Python 3.15.0 server. curl 8.23.0 also showed the failure when it was forced to expect HTTP/2 from a listener that sent this HTTP/1.0 response: curl: (16) Remote peer returned unexpected data while we expected SETTINGS frame. That curl error is a protocol negotiation failure, not a 505 that curl can parse.
Version negotiation through a proxy
For HTTPS, curl and most modern clients negotiate ALPN inside the TLS handshake. A forward proxy handling CONNECT sees the tunnel request and then relays encrypted bytes. If the proxy terminates TLS, its own HTTP version support becomes part of the path. For cleartext HTTP/2, the client sends the connection preface and the proxy must understand it. A proxy that accepts only HTTP/1 can emit 505 or close the connection.
Check the negotiated protocol with curl -v --http2 and curl -v --http1.1 against the same URL. If HTTP/1.1 succeeds while HTTP/2 fails, keep the fallback and inspect the proxy or CDN configuration. If both fail only through the proxy, the tunnel or TLS interception layer is the likely boundary. The ClientHello reference explains where ALPN is advertised.
PRI * HTTP/2.0 preface; it is not HTTP/1.1 with a different token. Use a client library’s version option so framing, headers and connection setup stay consistent.Causes and fixes
| Cause | How to confirm it | What to change |
|---|---|---|
| HTTP/2 sent to an HTTP/1-only listener | Raw preface or request line gets 505, while HTTP/1.1 returns 200 | Use the client’s HTTP/1.1 mode or enable HTTP/2 at that listener |
| Proxy cannot forward cleartext HTTP/2 | Direct HTTP/2 works, but the same URL through the proxy returns 505 | Use HTTPS CONNECT, select HTTP/1.1 for the proxy hop, or upgrade the proxy |
| TLS interception terminates ALPN incorrectly | The certificate issuer changes and the negotiated protocol differs through the proxy | Install the inspection CA only where policy permits, or bypass interception for that host |
| Invalid version token from a raw client | Server logs show a version it cannot parse, such as HTTP/2.0 on an HTTP/1 parser | Use a standards-compliant library and let it write the framing |
| Gateway maps an unsupported upstream version to 505 | Response identifies the gateway and includes an upstream diagnostic | Read the body and gateway logs, then align the upstream protocol settings |
A scraper should classify 505 as a configuration failure. Retry once with HTTP/1.1 on a fresh connection, then stop if that works. Rotating proxy exits does not fix a version mismatch shared by every exit. Keep the original status and the negotiated protocol in telemetry so a later 502 or empty reply is not mistaken for the same failure. The curl proxy guide shows the version flags and tunnel diagnostics.