# 426 Upgrade Required

> The server refuses to perform the request using the current protocol and requires the client to upgrade to a different protocol.

Source: https://howhttpworks.com/status-codes/426
Last reviewed: 2026-10-04

> **TL;DR:** `426 Upgrade Required` means “this request is not acceptable as-is; try again using a different protocol.”

## What 426 Is Actually For

A `426 Upgrade Required` response tells the client that the server understood the request, but refuses to process it over the current protocol. The server is effectively saying: “come back using this upgraded protocol instead.”

That is different from a redirect. The URL might stay the same. The protocol expectations change.

## Where You Might Realistically See It

The clearest real-world case is a WebSocket endpoint. If a client sends a normal HTTP request to an endpoint that only makes sense as a WebSocket upgrade, the server can answer with `426` and indicate that it expects `Upgrade: websocket`.

Example:

```http
HTTP/1.1 426 Upgrade Required
Upgrade: websocket
Connection: Upgrade
```

## Why It Feels Rare

Most web traffic does not use `426` because browsers and common web infrastructure prefer other patterns:

- HTTPS enforcement usually uses `301` or `308`
- HTTP/2 and HTTP/3 are usually negotiated automatically
- WebSocket libraries often fail the upgrade directly rather than surfacing 426 explicitly

So `426` is valid, but specialized.

## How To Read It Correctly

When you get a 426, ask:

- what protocol is the server demanding
- does my client know how to switch to it
- am I talking to a special endpoint with stricter expectations

If the answer is “this should have been a WebSocket,” then the fix is usually not in status-code handling. The fix is using the right client and handshake.

## 426 vs 505

These are easy to confuse:

- `426` means the server is willing to continue if the client upgrades
- `505` means the request’s HTTP version is unsupported and the current exchange cannot proceed as sent

So 426 is more like “different protocol, please,” while 505 is “this version is not acceptable here.”

## The Practical Rule

If you are building a normal website or JSON API, you probably will not use 426 often. If you are building upgrade-driven endpoints, it becomes more relevant.

## Try it with curl

Call a WebSocket-only endpoint with a plain request.

```bash
curl -i https://api.example.com/socket
```

Example output (illustrative, not captured from a real server):

```http
HTTP/1.1 426 Upgrade Required
Upgrade: websocket
Connection: Upgrade
```

The `Upgrade` header names what the server wants. Repeat the request with the handshake headers from [101 Switching Protocols](https://howhttpworks.com/status-codes/101) to see the upgrade succeed.

## Related Status Codes

- [101 Switching Protocols](https://howhttpworks.com/status-codes/101)
- [505 HTTP Version Not Supported](https://howhttpworks.com/status-codes/505)
- [301 Moved Permanently](https://howhttpworks.com/status-codes/301)
