What is the difference between 426 and 101?
A 426 asks the client to switch protocols before the server will respond. A 101 confirms that the server is switching protocols in answer to the client's Upgrade request.
The client must switch protocols, named in the Upgrade header. 426 belongs to the 4xx client error class and is defined in RFC 9110.
Loading the workbench.
The client must switch protocols, named in the Upgrade header. The code is registered with IANA and defined in RFC 9110.
Client error: the request has a problem, so it cannot be fulfilled as sent. Every code from 400 to 499 shares that general meaning, so a client that does not recognise 426 must treat it like 400.
426 Upgrade Required means the server refuses to process the request with the current protocol but will if the client switches. The response names the protocol it wants in an Upgrade header. You see it from WebSocket-only endpoints hit with plain HTTP, from servers that require a newer HTTP version, and occasionally from services insisting on TLS. It is the server asking for the upgrade, in contrast with 101, which confirms one.
Servers must send an Upgrade header listing acceptable protocols, plus Connection: Upgrade. Clients should repeat the request using the named protocol, for example a proper WebSocket handshake, or connect over https instead of http. For HTTPS enforcement on websites, a 301 or 308 redirect to https plus HSTS is the conventional and browser-friendly approach.
HTTP/1.1 426 Upgrade Required
Upgrade: websocket
Connection: Upgrade
Content-Length: 0426 is not cacheable by default: a browser or CDN stores it only when Cache-Control or Expires explicitly allows it.
To inspect a real one without sending it anywhere:
curl -i.Browse every code on the HTTP status codes page.
Elsewhere in 2http: Header decoder, Cookie decoder, Cache-Control decoder, CORS checker, User-agent parser, and all eleven lanes on the 2http home page. Part of the 2suite.io privacy-first ecosystem.
A 426 asks the client to switch protocols before the server will respond. A 101 confirms that the server is switching protocols in answer to the client's Upgrade request.
Opening a WebSocket endpoint as a normal page sends plain HTTP. The server needs a WebSocket handshake, so it answers 426 asking for the upgrade.
Yes. 426 is a client error response: the problem is in the request, so repeating it unchanged will usually fail again.
No. Caches store a 426 only when Cache-Control or Expires explicitly allows it.
You do not have to take our word that your headers stay here. Developer tools show every request a page makes, so you can watch this page work and confirm that nothing is sent. The check takes under a minute.
F12, or Cmd+Option+I on a Mac, and select the Network tab.Only two things can add a line to that log, and neither carries your headers. Submitting the feedback form sends the vote and comment you typed. Typing characters in a script the page has not displayed yet, such as Cyrillic or Greek, can make the browser fetch the matching font file, and that request names only the font.
2http never sends a request on your behalf: the request builder writes code for you to run, and the meta inspector reads source you paste instead of fetching a URL. The production site also sends a Content-Security-Policy header that tells your browser to refuse connections to anywhere except this site and the anonymous analytics endpoint.