--- title: "101 Switching Protocols — what it means and how to fix it" description: "The connection is being upgraded from HTTP to another protocol, usually WebSockets. What causes an HTTP 101, what to try as a visitor, and what to check if it is your own site." url: https://atoneplace.net/error/101/ site: "At One Place" --- # HTTP 101 — Switching Protocols **HTTP 101: Switching Protocols** The connection is being upgraded from HTTP to another protocol, usually WebSockets. ## What 101 actually means The client asked to change protocols on the existing TCP connection using an `Upgrade` header, and the server agreed. In practice this almost always means a WebSocket is being opened: the page requested `Upgrade: websocket`, got a 101 back, and from that point on the connection carries WebSocket frames rather than HTTP messages. Seeing 101 in a network panel next to a long-lived connection is normal and healthy. ## Common causes - A WebSocket connection is being established - A client requested an upgrade to HTTP/2 over cleartext (h2c) - A tunnelling protocol is negotiating over an existing HTTP connection ## If you're just trying to view the page 1. Nothing — this is a successful connection, not an error 2. If live features on a page do not work, a corporate proxy or firewall may be blocking the upgrade entirely, which would show as a failure rather than a 101 ## If it's your site 1. If WebSockets fail behind a reverse proxy, make sure it forwards `Upgrade` and `Connection` headers — Nginx needs `proxy_set_header Upgrade $http_upgrade;` and `proxy_set_header Connection "upgrade";` 2. HTTP/1.1 is required for the upgrade dance; a proxy that downgrades the connection will break it 3. Check `proxy_read_timeout` — the default of 60 seconds kills idle WebSockets ## Reference - **Status code:** 101 - **Reason phrase:** Switching Protocols - **Category:** 1xx — Informational - **Defined in:** RFC 9110 §15.2.2 ## Common questions ### What does HTTP 101 mean? The connection is being upgraded from HTTP to another protocol, usually WebSockets. The client asked to change protocols on the existing TCP connection using an `Upgrade` header, and the server agreed. In practice this almost always means a WebSocket is being opened: the page requested `Upgrade: websocket`, got a 101 back, and from that point on the connection carries WebSocket frames rather than HTTP messages. ### How do I fix a 101 error? Nothing — this is a successful connection, not an error ### Is 101 a client error or a server error? 101 is in the 1xx range, which means informational. It is not an error at all. ## Related pages - [103 Early Hints](https://atoneplace.net/error/103/) - [100 Continue](https://atoneplace.net/error/100/) - [102 Processing](https://atoneplace.net/error/102/) - [104 Upload Resumption Supported](https://atoneplace.net/error/104/) ## Sources - Hypertext Transfer Protocol (HTTP) Status Code Registry — IANA (https://www.iana.org/assignments/http-status-codes/) - RFC 9110: HTTP Semantics — IETF (https://www.rfc-editor.org/rfc/rfc9110.html)