# 505 HTTP Version Not Supported

> https://http-status.org/docs/505

**Family:** 5xx Server Error

## Rationale

Server does not support the HTTP protocol version used in the request.

## In Plain Terms

You're speaking an old or new version of HTTP that I don't understand. Please use a version I support.

## Description

The HTTP 505 HTTP Version Not Supported status code indicates that the server does not support, or refuses to support, the major version of HTTP that was used in the request message. The code is also triggered in practice when a misconfigured proxy corrupts or decodes the request line, causing the origin to receive an unparseable version token.

## Server Perspective

### Usage
- Return 505 when the client speaks a protocol version the server will not service
- Use it for version incompatibility, not for unsupported methods or optional protocol upgrades
- Client uses unsupported HTTP version
- HTTP/0.9 requests to modern servers
- Future major HTTP versions the server refuses to process
- A server or intermediary enforcing a minimum or maximum supported HTTP major version

### Implementation
- If practical, describe which HTTP versions the server supports so clients can recover
- Validate that the failure is really version-related and not just a malformed request line better described by 400

### Common Headers
- No status-specific header is required; include explanatory metadata in the body when recovery is possible

### Body
- A body is recommended; describe why the version is unsupported and list the versions the server accepts (RFC 9110 SHOULD).

### Pitfalls
- Do not use 505 when the server merely wants the client to switch protocols or upgrade features; compare with 426 Upgrade Required
- Do not collapse general parsing bugs into 505 if the issue is ordinary malformed syntax
- Protocol upgrade required (use 426 Upgrade Required)
- Method not implemented (use 501 Not Implemented)
- Bad request format (use 400 Bad Request)

## Client Perspective

### Pitfalls
- Do not assume authentication or payload changes will fix a protocol-version failure
- Do not downgrade protocol versions blindly unless you know the server or intermediary is misbehaving

## Examples

### Unsupported HTTP version

Server requires HTTP/1.1 or later

**Request:**
```
GET https://api.example.test/legacy-endpoint
```

**Response:**
```
505 HTTP Version Not Supported
Content-Type: application/json

{
  "error": "http_version_not_supported"
}
```

## Related Codes

- [426 Upgrade Required](/docs/426.md)
- [501 Not Implemented](/docs/501.md)

