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
- Nothing — this is a successful connection, not an error
- 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
- 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";`
- HTTP/1.1 is required for the upgrade dance; a proxy that downgrades the connection will break it
- 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 The server sends resource hints early so the browser can start downloading asset
- 100 Continue The server has read your request headers and wants you to send the body.
- 102 Processing A WebDAV server is still working on a long request and is telling the client not
- 104 Upload Resumption Supported A provisional code signalling that the server supports resumable uploads.