101 Switching Protocols
The server agrees to switch to the protocol named in the Upgrade header, most often WebSocket.
When a browser opens a WebSocket over HTTP/1.1, it sends Upgrade: websocket and Connection: Upgrade. A 101 response means the TCP connection now speaks WebSocket instead of HTTP.
If you expect 101 and get 200, 400 or 426 instead, a reverse proxy in front of the app usually does not forward the Upgrade and Connection headers.
What to do
- In nginx, set proxy_http_version 1.1 and forward Upgrade and Connection explicitly.
- Check that load balancers and CDNs have WebSocket support enabled for the route.
Check a URL
See which status code a page returns right now with the header check.
Specification: RFC 9110 §15.2.2