Skip to content

505 HTTP Version Not Supported

Description

The 505 HTTP Version Not Supported status code indicates that the server does not support, or refuses to support, the HTTP protocol version that was used in the request. This status is sent when the server recognizes the HTTP version in the request but is unable or unwilling to fulfill the request using that version.

Common scenarios where a 505 HTTP Version Not Supported might occur include:

  • A client attempts to use HTTP/2 or HTTP/3 with a server that only supports HTTP/1.1
  • A client uses an obsolete HTTP version (like HTTP/0.9) that the server no longer supports
  • A server is configured to reject certain HTTP protocol versions for security or compatibility reasons
  • A proxy or gateway receives a request with an HTTP version it doesn't understand

This status code is relatively rare in practice, as most modern clients automatically negotiate compatible HTTP versions with servers.

Syntax

HTTP/1.1 505 HTTP Version Not Supported
Content-Type: application/json
Content-Length: 189

{
  "error": {
    "code": 505,
    "message": "HTTP Version Not Supported",
    "details": "The server does not support the HTTP protocol version used in the request."
  }
}

Examples

Example 1: Unsupported HTTP Version

A client attempts to use HTTP/3 with a server that only supports HTTP/1.1 and HTTP/2.

Request:

GET /api/resources HTTP/3
Host: example.com
Accept: application/json

Response:

HTTP/1.1 505 HTTP Version Not Supported
Content-Type: application/json
Content-Length: 201

{
  "error": {
    "code": 505,
    "message": "HTTP Version Not Supported",
    "details": "This server only supports HTTP/1.1 and HTTP/2. Your request used HTTP/3 which is not supported."
  }
}

Example 2: Obsolete HTTP Version

A client uses an obsolete HTTP version that the server no longer supports.

Request:

GET /index.html HTTP/0.9
Host: example.com

Response:

HTTP/1.1 505 HTTP Version Not Supported
Content-Type: application/json
Content-Length: 213

{
  "error": {
    "code": 505,
    "message": "HTTP Version Not Supported",
    "details": "This server requires at minimum HTTP/1.1. Your request used HTTP/0.9 which is obsolete and no longer supported."
  }
}

Example 3: Security Policy Restriction

A server is configured to reject HTTP/1.0 requests due to security vulnerabilities in that protocol version.

Request:

GET /api/sensitive-data HTTP/1.0
Host: example.com
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...

Response:

HTTP/1.1 505 HTTP Version Not Supported
Content-Type: application/json
Content-Length: 240

{
  "error": {
    "code": 505,
    "message": "HTTP Version Not Supported",
    "details": "For security reasons, this API endpoint requires HTTP/1.1 or later. HTTP/1.0 is not supported due to known security vulnerabilities."
  }
}

Summary

The 505 HTTP Version Not Supported status code indicates that the server does not support the HTTP protocol version used in the request. It signals to the client that it needs to use a different HTTP version to successfully communicate with the server.

Key points about 505 HTTP Version Not Supported:

  1. It indicates a fundamental incompatibility between the client and server regarding HTTP protocol version
  2. It's a permanent condition (unlike temporary errors like 503)
  3. The server should indicate which HTTP versions it does support in the response
  4. Modern browsers and HTTP clients typically handle HTTP version negotiation automatically
  5. This status is relatively rare in practice due to the backward compatibility built into HTTP
  6. Clients receiving this status should retry with a different HTTP version if possible
  7. It differs from 501 Not Implemented, which is about specific functionality not being supported, rather than the protocol version itself