HTTP

Status Code

505 HTTP Version Not Supported

Learn what 505 HTTP Version Not Supported means when servers reject protocol versions. Understand HTTP/1.1, HTTP/2 compatibility and version negotiation.

2 min read intermediate Try in Playground

TL;DR: Server doesn’t support the HTTP version used in the request. Configure your client to use a supported HTTP version (usually HTTP/1.1).

What is 505 HTTP Version Not Supported?

A 505 HTTP Version Not Supported status code means the server doesn’t support the HTTP protocol version used in the request. Think of it like trying to speak a language the other person doesn’t understand.

When Does This Happen?

1. Unsupported HTTP Version

Client uses HTTP/3.0
Server only supports HTTP/1.1 and HTTP/2

2. Malformed Version

Client sends invalid HTTP version string

Example Response

HTTP/1.1 505 HTTP Version Not Supported
Content-Type: text/html

<!DOCTYPE html>
<html>
<body>
<h1>505 HTTP Version Not Supported</h1>
<p>This server does not support HTTP/3.0</p>
<p>Supported versions: HTTP/1.0, HTTP/1.1, HTTP/2.0</p>
</body>
</html>
```javascript

## Implementation

```javascript
app.use((req, res, next) => {
  const version = req.httpVersion

  if (!['1.0', '1.1', '2.0'].includes(version)) {
    return res.status(505).send('HTTP Version Not Supported')
  }

  next()
})

HTTP Version Negotiation in Practice

Modern clients and servers negotiate the HTTP version automatically, which is why 505 errors are rare in practice. The negotiation mechanism depends on the transport layer.

For HTTP/2 over TLS, browsers use ALPN (Application-Layer Protocol Negotiation), a TLS extension that lets the client advertise supported protocols during the TLS handshake. The server picks the best match and confirms it before any HTTP traffic flows. If the server only supports HTTP/1.1, the connection falls back gracefully without a 505 error.

For HTTP/3 (QUIC), the server advertises support via the Alt-Svc response header or DNS HTTPS records. Clients that don’t support HTTP/3 simply continue using HTTP/2 or HTTP/1.1.

A 505 typically appears in these real-world scenarios: a misconfigured reverse proxy that strips or rewrites the HTTP version line, a custom HTTP client that hard-codes an unsupported version string, or very old server software that predates HTTP/1.1 and rejects anything beyond HTTP/1.0. In all cases, the fix is to align the client and server on a mutually supported version rather than trying to force a specific protocol version.

When you encounter a 505 in server logs, check the raw request line (e.g., GET / HTTP/2.0) and compare it against the versions your server software is configured to accept. Most modern web servers accept HTTP/1.0, HTTP/1.1, and HTTP/2 without any special configuration.

Frequently Asked Questions

What does 505 HTTP Version Not Supported mean?

A 505 error means the server does not support the HTTP protocol version used in the request. The server cannot or will not process requests using that protocol version.

When does 505 occur?

It occurs when a client uses an HTTP version the server does not support, like HTTP/2 on a server that only supports HTTP/1.1, or HTTP/3 on older infrastructure.

How do I fix a 505 error?

Configure your client to use a supported HTTP version. Most clients automatically negotiate the best version, so this error is rare. Check server logs for the requested version.

Is 505 common?

No, 505 is rare because most servers support HTTP/1.1 and clients negotiate versions automatically. It may occur with misconfigured proxies or very old server software.

Keep Learning