505 HTTP Version Not Supported
5xx server error
The server doesn't support the HTTP version used in the request.
505 means the server refuses the request's HTTP version. It's rare in practice: clients and servers negotiate versions (HTTP/2 and HTTP/3 through ALPN), so a 505 usually points at a hand-written request or a broken client.
| Class | 5xx Server Error |
|---|---|
| Retry? | No — change the request first |
| Cacheable by default | No — only with explicit Cache-Control |
| Response body | Allowed |
| Defined in | RFC 9110 §15.6.6 — 505 HTTP Version Not Supported |
Example response
HTTP/1.1 505 HTTP Version Not Supported
Content-Type: application/json
Content-Length: 38
{"error":"HTTP Version Not Supported"}Common causes
- Malformed request lines from custom clients, such as
HTTP/1.2or a typo. - Old servers receiving a version they don't recognise.
How to fix it
- Send HTTP/1.1 from custom clients and let the library negotiate HTTP/2.
- Inspect the raw request line (with netcat or a proxy) for typos.
Send a 505 from your server
Express
res.status(505).json({ error: "HTTP Version Not Supported" });Next.js route handler
return Response.json({ error: "HTTP Version Not Supported" }, { status: 505 });Flask
return {"error": "HTTP Version Not Supported"}, 505Go net/http
http.Error(w, "HTTP Version Not Supported", http.StatusHTTPVersionNotSupported)
nginx
return 505;
Check what a URL returns
Print just the status line from the command line, or check a whole list of URLs at once, with their response headers, in the HTTP Status Checker.
curl -sI https://example.com/your-path | head -n 1
Frequently asked questions
Do browsers ever get 505?
Practically never. Browsers negotiate the HTTP version with the server before sending requests, so mismatches don't happen.
Related status codes