Start free · Free tools · Fair usage limits
Browse Tools

Categories

Custom AI Solutions – AI2Flows
LIVE NEWS
Loading latest AI & SEO news…
Home›Tools›HTTP Status Codes Reference›HTTP 426 Upgrade Required
4xx Client Error

HTTP 426 Upgrade Required

HTTP 426 Upgrade Required means the server refuses the request over the current protocol and requires the client to switch to the protocol named in the…

Quick answer

HTTP 426 Upgrade Required means the server refuses the request over the current protocol and requires the client to switch to the protocol named in the Upgrade header, for example a newer TLS or HTTP version, or WebSocket.

Last updated · Maintained by FreeAIToolz · How we test

What does HTTP 426 Upgrade Required mean?

The server must send an Upgrade header listing the required protocol. It is commonly seen when a plain HTTP request hits a WebSocket-only endpoint or when a service enforces a minimum protocol version.

Status code426
NameUpgrade Required
Class4xx Client Error
Defined inRFC 9110 §15.5.22
Cacheable by defaultNo, unless Cache-Control says so
Safe to retry automatically?No: change the request first
Related headersUpgrade, Connection: Upgrade

What causes HTTP 426?

  • A regular HTTP request to a WebSocket endpoint.
  • A server requiring HTTP/2 or a newer TLS version.

How do I fix HTTP 426?

  1. Connect using the protocol in the Upgrade header (for example ws:// or wss:// for WebSocket endpoints).

What should a client do after HTTP 426?

Switch protocols and retry.

Does HTTP 426 affect SEO?

No SEO impact for normal pages.

Example 426 response

HTTP/1.1 426 Upgrade Required
Date: Mon, 01 Dec 2026 12:00:00 GMT
Upgrade: HTTP/2.0
Connection: Upgrade
Content-Type: application/json

{"error":{"status":426,"message":"Upgrade Required"}}

How to return 426 Upgrade Required in code

Express (Node.js)

res.status(426).json({ error: 'Upgrade Required' });

Next.js route handler

return Response.json({ error: 'Upgrade Required' }, { status: 426 });

FastAPI (Python)

raise HTTPException(status_code=426, detail="Upgrade Required")

PHP

http_response_code(426);

Nginx

location = /example {
    return 426;
}

Other 4xx status codes

The request contains an error or cannot be fulfilled as sent. Fix the request before retrying.

Frequently asked questions

Why does opening a WebSocket URL in the browser return 426?
Typing the URL makes a normal HTTP GET without Upgrade headers. Connect with a WebSocket client instead.
426 vs 101?
101 means the server agreed to switch protocols. 426 means it requires a switch the client has not requested.
Is 426 a client or server error?
426 is in the 4xx class, so it is classed as a client error: the request needs to change before it can succeed.