# HTTP 505 HTTP Version Not Supported — Meaning, Causes & Fixes

> 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
- Defined in: [RFC 9110 §15.6.6 — 505 HTTP Version Not Supported](https://www.rfc-editor.org/rfc/rfc9110.html#section-15.6.6)

## Example response

```http
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.2` or a typo.
- Old servers receiving a version they don't recognise.

## How to fix it

1. Send HTTP/1.1 from custom clients and let the library negotiate HTTP/2.
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"}, 505
```

### Go net/http

```
http.Error(w, "HTTP Version Not Supported", http.StatusHTTPVersionNotSupported)
```

### nginx

```
return 505;
```

## FAQ

### 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

- [426 Upgrade Required](https://www.devkult.com/http/426.md)
- [400 Bad Request](https://www.devkult.com/http/400.md)
- [501 Not Implemented](https://www.devkult.com/http/501.md)

Open the interactive page: https://www.devkult.com/http/505