Free auditStart free
GuideError · HTTP status codes

101 Switching Protocols

HTTP 101 Switching Protocols is a success signal: the server agreed to change protocol, usually to WebSocket. How the handshake works and how to proxy it.

3 min
read
4
sources
Oct 24, 2026
updated
Scaplet Editorial Team
author
The short answer

HTTP 101 Switching Protocols is not an error. It means the server accepted the client's Upgrade request and is moving the connection to another protocol, most often WebSocket. The server must name the new protocol in an Upgrade header. If a WebSocket fails to connect, the cause is usually that no 101 came back.

  1. What HTTP 101 means and who sends it
  2. What visitors should know
  3. How to find and fix a failed upgrade as a developer
  4. What it does to SEO
30-second check

Where does your site stand?

Four quick questions, then a straight answer.

1/4Have you checked your own site for this?
Summarize this page withChatGPTClaudePerplexityGoogleAI Mode
01The codes around a protocol upgrade

What HTTP 101 means and who sends it

RFC 9110 says 101 (Switching Protocols) "indicates that the server understands and is willing to comply with the client's request" for a change in the application protocol being used on the connection, made through the Upgrade header. The server "MUST generate an Upgrade header field in the response that indicates which protocol(s) will be in effect after this response".
Code

101 Switching Protocols

Meaning
Server agreed; the connection now uses the new protocol
Code

426 Upgrade Required

Meaning
Server refuses the current protocol and lists acceptable ones in Upgrade
Code

200, 400 or other final code

Meaning
Upgrade was ignored or the request was rejected; no switch happened

The client asks and the server answers, so 101 comes from the origin server or from a proxy that tunnels the connection. After the response, the same TCP connection carries the new protocol, such as WebSocket. A server "MUST NOT switch to a protocol that was not indicated by the client in the corresponding request's Upgrade header field" and "MAY ignore a received Upgrade header field" and keep using HTTP, which usually means a normal 200 or similar instead of 101.

02Explained

What visitors should know

A visitor never needs to act on a 101. It is a success signal, and the page or app carries on over the new protocol. If a live feature such as chat or notifications does not connect, open the browser DevTools Network tab, find the request to the socket URL and look at its status. Anything other than 101 means the upgrade did not succeed, and the status that came back is the thing to report to the site.
03How it works

How to find and fix a failed upgrade as a developer

nginx WebSocket proxy config (from the nginx docs)
location /chat/ {
    proxy_pass http://backend;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
}
A WebSocket upgrade (MDN example)
GET /notifications HTTP/1.1
Host: example.com
Upgrade: websocket
Connection: Upgrade

HTTP/1.1 101 Switching Protocols
Upgrade: websocket
Connection: Upgrade
  1. 01

    Check the request headers

    The client must send Upgrade: websocket and Connection: Upgrade. RFC 9110 says a sender of Upgrade must also send an Upgrade connection option in the Connection header field.

  2. 02

    Check the response

    A valid 101 carries Upgrade and Connection headers. If you get 200 or 400 instead, the server (or a proxy) did not accept the handshake.

  3. 03

    Pass the headers through your reverse proxy

    Upgrade and Connection are hop-by-hop, so nginx's documentation says they "have to be passed explicitly". Without that, the backend never sees the request to switch.

  4. 04

    Raise idle timeouts

    nginx closes a proxied WebSocket connection by default "if the proxied server does not transmit any data within 60 seconds". Increase proxy_read_timeout or send periodic ping frames.

  5. 05

    Check HTTP/1.1 versus newer

    The Upgrade mechanism is for transitioning from HTTP/1.1; test the handshake with a client that uses it before debugging the backend.

04Explained

What it does to SEO

Google's documentation on how HTTP status codes affect its crawlers does not list 101, and it says Search Console "generates error messages for status codes in the 4xx—5xx range". A failed upgrade breaks a live feature such as chat, but it is not a page status that Google reports. If a page itself returns a 4xx or 5xx, see 4xx errors and Google's documentation on how HTTP status codes affect its crawlers. Related: 426 Upgrade Required.
Questions

Asked a lot.

4 questions people ask next, answered from the sources on this page.

01What is status 101 in WebSocket?

It is the server's reply to the WebSocket handshake. It confirms the switch from HTTP to WebSocket and includes Upgrade: websocket.

02Is HTTP 101 an error?

No. It is an informational response that signals success. Errors in a WebSocket connection show up as a different final status.

03Why does my WebSocket not get a 101 behind nginx?

nginx does not pass Upgrade and Connection to the backend by default, because they are hop-by-hop headers. Set both explicitly with proxy_set_header.

04Can the server ignore an Upgrade header?

Yes. RFC 9110 says a server MAY ignore it and continue using the current protocol.

Sources · 4

Every fact, linked and dated.

Official docs first. The date is when we last opened each page.
  • rfc-editor.org
  • mozilla.org
  • nginx.org
  • iana.org
  1. 01RFC 9110: HTTP Semanticsrfc-editor.org · checked 2026-10-25
  2. 02MDN: 101 Switching Protocolsdeveloper.mozilla.org · checked 2026-10-25
  3. 03nginx: WebSocket proxyingnginx.org · checked 2026-10-25
  4. 04IANA HTTP Status Code Registryiana.org · checked 2026-10-25
Free · 2 minutes

Tools point. Agencies advise. This one ships.

Run the free audit, then approve the fixes. Every change can be undone.

Free, no card60 secondsNobody will call you
  • 46 fixes shipped without a ticket Brightpipe
  • 0→7 ChatGPT citations in six weeks Paylane