505

HTTP Version Not Supported

5xx Server Error

ELI5

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

Server perspective

Use 505 when the request's HTTP major version is unsupported or intentionally refused by the server.

When to use

  • 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

How to respond

  • 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

Headers to consider

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

Response body

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

Server-side 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)

Examples

Unsupported HTTP version

Request:GET https://api.example.test/legacy-endpoint
Response:505 HTTP Version Not Supported # Headers Content-Type: application/json # Body { "error": "http_version_not_supported" }

Server requires HTTP/1.1 or later

References

Related Status Codes