Skip to content

505 HTTP Version Not Supported

The server does not support, or refuses to use, the major HTTP version the client used for the request.

What 505 HTTP Version Not Supported means

The server should explain in the body which versions it supports. Clients and servers usually agree on HTTP/2 or HTTP/3 during the TLS handshake, so 505 is rare.

Common causes

  • A malformed request line, such as a typo in HTTP/1.1 from a hand-written client.
  • A proxy forwarding requests in an HTTP version the backend does not support.

How to fix 505 HTTP Version Not Supported

  1. Use a standard HTTP client library and let it choose the version.
  2. Check the proxy's upstream settings, such as proxy_http_version in nginx.
  3. Upgrade or reconfigure the backend server.

Example response

HTTP/1.1 505 HTTP Version Not Supported
Content-Type: text/plain; charset=utf-8

505 HTTP Version Not Supported

How to check for a 505 response

cURL

# Print only the status code
curl -s -o /dev/null -w "%{http_code}\n" https://example.com/

JavaScript (Node.js)

const res = await fetch("https://example.com/");
if (res.status === 505) {
  console.log(res.status, res.statusText);
}

Python

import requests

res = requests.get("https://example.com/")
if res.status_code == 505:
    print(res.status_code, res.reason)

Go

res, err := http.Get("https://example.com/")
if err != nil {
	log.Fatal(err)
}
defer res.Body.Close()
if res.StatusCode == 505 {
	fmt.Println(res.Status)
}

Specification

505 HTTP Version Not Supported is defined in RFC 9110, section 15.6.6.

  • 426

    Upgrade Required

    The server refuses to handle the request over the current protocol, and its Upgrade header names the protocol to switch to.

  • 501

    Not Implemented

    The server does not support the functionality needed for the request, typically an HTTP method it does not recognise.

  • 400

    Bad Request

    The server could not understand the request because something in it is malformed, like broken JSON, bad syntax or invalid headers.

← all 63 HTTP status codes

Type to search posts, tools and projects.

Keyboard shortcuts

Search+Kor/
Go to homegthenh
Go to bloggthenb
Go to projectsgthenp
Go to timelinegthent
Show this help?
Close search or helpesc