The HTTP 505 – HTTP Version Not Supported status code indicates that the server does not support, or refuses to support, the HTTP protocol version used in the client request.
? Key Concepts
It is a server-side error (5xx category).
Occurs when the request uses an unsupported HTTP version.
Commonly related to HTTP/0.9, HTTP/1.0, or malformed version strings.
The server understands the request format but not the protocol version.
? Syntax / Theory
An HTTP request always specifies a protocol version in the request line. If the server cannot handle that version, it responds with status code 505.
? View Code Example
// HTTP request line using an unsupported version
GET /index.html HTTP/9.9
? Code Example(s)
? View Code Example
// Example Node.js server returning 505 for unsupported versions
const http = require("http");
http.createServer((req, res) => {
res.statusCode = 505;
res.setHeader("Content-Type", "text/plain");
res.end("HTTP Version Not Supported");
}).listen(3000);
? Live Output / Explanation
Server Response
When a client sends a request with an unsupported HTTP version, the server responds:
Status Code: 505
Message: HTTP Version Not Supported
? Interactive Example / Diagram
Below is a simplified flow of how a 505 error occurs:
Client sends request with HTTP version
Server parses request line
Server checks supported protocol versions
If unsupported → responds with 505
?️ Protocol Version Simulator
Select a protocol version to send to the server. This server only supports HTTP/1.1 and HTTP/2.
// Server log awaiting request...
? Use Cases
Legacy clients using outdated HTTP versions
Malformed or custom-built HTTP requests
Strict servers configured to allow only HTTP/1.1 or HTTP/2