Geonode logo
Website and server errors

How to Fix 505 HTTP Version Not Supported

Check the HTTP version your client sent, resend as HTTP/1.1, and trace any hop that rewrote your request.

Updated

TL;DR

505 HTTP Version Not Supported means a website's server, or a proxy or load balancer in front of it, refuses the HTTP version your request named. The fastest fix is to stop forcing a version: send plain HTTP/1.1, or let your HTTP client negotiate it.

What a 505 looks like in servers and clients

Servers word the refusal in their own way; most clients print only the number.

WhereWhat you see
Go net/http server, status lineHTTP/1.1 505 HTTP Version Not Supported: unsupported protocol version
nginx default error page, heading505 HTTP Version Not Supported
Chrome, when the 505 has an empty bodyHTTP ERROR 505
curl --failcurl: (22) The requested URL returned error: 505
Python urllib.requesturllib.error.HTTPError: HTTP Error 505: HTTP Version Not Supported
Python requests (raise_for_status)requests.exceptions.HTTPError: 505 Server Error: HTTP Version Not Supported for url: https://shop.example.com/cart
Java HttpURLConnectionjava.io.IOException: Server returned HTTP response code: 505 for URL: https://shop.example.com/cart

Why this happens

The opening line of what you sent claims a protocol version the server won't speak.

Requests built by hand or with a forced version flag do this. HTTP/2 is agreed in the TLS handshake and sent as binary frames, so text claiming HTTP/2.0 got 505 from Go's server in our test.

Diagnose your 505 first

The first check needs only a browser; the rest show what was sent and who refused it.

  • Open the address in a second browser or on another device on the same Wi-Fi; if 505 appears there too, your browser isn't the cause.

  • Run curl -v on the URL; if the first > line ends in HTTP/1.1 yet 505 returns, the cause lies beyond your client.

  • Repeat with curl --http1.1 and a percent-encoded URL; if that succeeds where your own code gets 505, your code builds the request wrongly.

  • Read the 505's body; 'unsupported protocol version' is Go's server, and a page with an nginx footer was written by nginx itself.

  • Site owners: set nginx's error_log to info; 'client sent invalid version' means nginx refused a major version above 1.

Solutions ranked by effectiveness

The first two fix your own request; the third is for site owners.

  1. Most common fix

    Send the request as HTTP/1.1

    Applies when your code or tool names the version itself, such as a hand-written HTTP/2.0 line or a flag that skips negotiation. Send plain HTTP/1.1, then read the version, status and body returned.

    import http.client, urllib.parse
    
    path = urllib.parse.quote("/files/annual report.pdf")
    conn = http.client.HTTPSConnection("example.com", timeout=30)
    conn.request("GET", path)
    res = conn.getresponse()
    print("got:", f"HTTP/{res.version / 10}", res.status, res.reason)
    print(res.read(300).decode(errors="replace"))
    conn.close()
  2. Check next

    Repair the request line

    Applies when your code or device writes the request text itself, or only addresses with spaces fail. Older servers, such as Tomcat 7.0.70, read the word after a raw space as the version.

    1. Replace each space in the path or query with %20 before sending.

    2. End the first line with HTTP/1.1 and \r\n, not a bare \n.

    3. Trim line breaks from any value you paste into the URL.

    4. Prefer an HTTP library: curl, Python's urllib and Node.js reject or encode raw spaces.

  3. Site owners

    Fix the hop that changes requests

    Applies when clients send valid HTTP/1.1 and still get 505. Look for a reverse proxy or load balancer that forwards a decoded URL, or a version its backend refuses.

    1. In nginx, write proxy_pass without a URI or with $request_uri, never the decoded $uri.

    2. On an AWS ALB, point HTTP/2 clients at an HTTPS listener.

    3. Check its access log: a 505 with target_status_code - came from the balancer itself.

    4. Then request an address containing %20 through the proxy and expect 200.

Stop the 505 from coming back

Habits for whoever runs the servers, so the next refused request is easy to trace.

  1. Write a 505 body that names the versions you accept; RFC 9110 recommends it.

  2. Keep $request in nginx's log_format; it records the full request line, version included, beside each 505.

  3. After adding a proxy, log the version your app receives; nginx before 1.29.7 sent HTTP/1.0 upstream by default.

  4. Answer a malformed request line with 400 or a 301 to the encoded address, as RFC 9112 advises.

Know the reply to expectGeonode's first-request guide shows the JSON a working residential proxy request returns.
Try residential proxies

Related errors

Learn more

FAQ

It is HTTP Version Not Supported: the server does not support, or refuses to support, the major HTTP version of your request. The number sits in the 5xx server-error class, but the refusal is about what the request declared.

In your own code, send HTTP/1.1 through an HTTP library and stop forcing another version. Browsers set the version themselves, so a visitor can only report the address to the site's owner.

400 covers any request the server finds malformed; 505 is only for an HTTP version it will not serve. In our tests a raw space in the path got 400 from Apache, Go, Node.js and Python's http.server.

On plain HTTP it can: RFC 9112 has a forwarding proxy send its own HTTP version, so the site judges the proxy's request line. An HTTPS tunnel only relays bytes, and Geonode's docs list no 505 among gateway codes.

Yes, when a client speaks HTTP/2 without negotiating it first. AWS says its Application Load Balancer answers 505 to an HTTP/2 request on an HTTP/1 connection; in our test, curl's --http2-prior-knowledge made Python's http.server log 505.

Seldom, because 505 concerns the major version, and every server we tested answered HTTP/1.0 with 200. Envoy refuses HTTP/1.0 unless accept_http_10 is set, but with 426 Upgrade Required.

Proxy endpoints for your tools

Create HTTP, HTTPS or SOCKS5 endpoints in the dashboard for browsers, scrapers or scripts.