HTTP status · 1xx — informational
101 Switching Protocols
101 Switching Protocols confirms that the server is switching to a protocol requested in the Upgrade header.
Key facts
| Class | 1xx — informational |
|---|---|
| Standard | RFC 9110 §15.2.2 |
| Requires | Upgrade and Connection: Upgrade headers |
| Common use | WebSocket handshake |
| HTTP conversation | Ends at the switch |
What 101 means
The client asks for a different protocol with Upgrade: websocket (or another protocol) and Connection: Upgrade. A 101 response means the server agrees. After the response headers, the same TCP connection no longer speaks HTTP — for WebSocket it carries frames defined by RFC 6455.
Debugging a failed upgrade
A WebSocket that never connects usually never gets a 101. The server may answer 400 for a malformed handshake, 401 or 403 for authentication, 404 when the upgrade route is not registered, or 426 when the protocol version is unacceptable. Proxies and CDNs must forward the Upgrade and Connection headers; a proxy that strips them turns a valid handshake into a plain GET.
Frequently asked questions
Does 101 mean the WebSocket is connected?
It means the protocol switch was accepted. The connection is usable as a WebSocket once the handshake response is validated.
Why is my WebSocket upgrade returning 200?
A plain 200 means the route was handled as a normal HTTP request — usually a proxy removed the Upgrade headers or the server has no WebSocket handler at that path.