Qaynaq LABS · TOOLS

HTTP · 4xx Client Error

426 Upgrade Required

Server refuses to process request without a required protocol upgrade.

When you see this status

  • Client sends HTTP/1.0 request to server requiring HTTP/1.1
  • Client uses deprecated protocol version for the endpoint
  • Server mandates TLS upgrade but client doesn't support it

Common causes

  • Client uses outdated HTTP protocol version
  • Server requires TLS but client connects via plain HTTP
  • API version mismatch between client and server

How to debug it

  1. Verify client's HTTP protocol version in request headers
  2. Check server's minimum protocol requirements
  3. Inspect response 'Upgrade' header for required protocol
  4. Update client to use supported protocol version

Return this code in your framework

Express (Node.js)
res.status(426).set('Upgrade', 'h2').send('Upgrade to HTTP/2 required');
FastAPI (Python)
@app.get('/')
def root():
    return Response(status_code=426, headers={'Upgrade': 'h2'})
NestJS
@Get()
root(): string {
  return 'Upgrade Required';
}
@HttpCode(426)
@Header('Upgrade', 'h2')
@Get('upgrade')
upgrade() {}
Go (net/http)
w.WriteHeader(http.StatusUpgradeRequired)
w.Header().Set("Upgrade", "h2")

About HTTP 426

HTTP status code 426 Upgrade Required is part of the 4xx Client Error family. Server refuses to process request without a required protocol upgrade. Understanding it is essential for backend engineers, API designers, and anyone debugging integrations between services.

The Qaynaq Labs HTTP Status Code Explainer covers all standard codes with practical guidance: what triggers them, how to debug them in production, and exactly how to return them from common frameworks. Each code page is hand-curated and verified.

Frequently asked

What should the client do when receiving 426?

The client should upgrade to the protocol specified in the 'Upgrade' header and retry the request.

Can 426 be used for protocol downgrades?

No, 426 specifically requires an upgrade to a newer or more secure protocol version.

Is 426 commonly used in production?

Rarely. Most modern APIs use version headers or content negotiation instead of protocol upgrades.