505 HTTP Version Not Supported

HTTP response status code 505 HTTP Version Not Supported is a server error message that indicates the server is unwilling to process the HTTP request using the major version of HTTP that was used in the HTTP request message.

Usage

When the 505 HTTP Version Not Supported status code is received, it means that the server does not support the major protocol used by the HTTP request. The server is expected to generate a HTTP response indicating why the specific HTTP protocol is not supported and also list which HTTP protocols the server is willing to accept at this URI.

Example

In the example, the client requests a resource and the server responds with a 505 HTTP Version Not Supported status code because it does not support HTTP/3.

Request

GET / HTTP/3
Host: www.example.re

Response

HTTP/1.1 505 HTTP Version Not Supported
Content-Type: text/html; charset=UTF-8
Content-Length: 150

<html>
  <head>
    <title>Protocol Not Supported<\title>
  </head>
  <body>
    <p>HTTP/3 not supported. Please use HTTP/1.1.</p>
  </body>
</html>

Code references

.NET

HttpStatusCode.HttpVersionNotSupported

Rust

http::StatusCode::HTTP_VERSION_NOT_SUPPORTED

Rails

:http_version_not_supported

Go

http.StatusHTTPVersionNotSupported

Symfony

Response::HTTP_VERSION_NOT_SUPPORTED

Python3.5+

http.HTTPStatus.VERSION_NOT_SUPPORTED

Java

java.net.HttpURLConnection.HTTP_VERSION

Apache HttpComponents Core

org.apache.hc.core5.http.HttpStatus.SC_HTTP_VERSION_NOT_SUPPORTED

Angular

@angular/common/http/HttpStatusCode.HttpVersionNotSupported

Takeaway

The 505 HTTP Version Not Supported status code is a server error that is generated when the server is unable or unwilling to process a HTTP request because it does not support the HTTP protocol that was used to submit it.

See also

Last updated: August 2, 2023