HTTP 101 Switching Protocols
HTTP 101 Switching Protocols means the server agrees to the client’s Upgrade request and switches the connection to a different protocol.
Quick answer
HTTP 101 Switching Protocols means the server agrees to the client’s Upgrade request and switches the connection to a different protocol. It is the normal response when opening a WebSocket connection: the browser sends Upgrade: websocket and the server answers 101.
Last updated · Maintained by FreeAIToolz · How we test
What does HTTP 101 Switching Protocols mean?
After a 101 response the same TCP connection stops speaking HTTP/1.1 and starts speaking the protocol named in the Upgrade header, most commonly WebSocket (RFC 6455). HTTP/2 and HTTP/3 do not use 101; WebSockets over HTTP/2 use the extended CONNECT method instead.
| Status code | 101 |
|---|---|
| Name | Switching Protocols |
| Class | 1xx Informational |
| Defined in | RFC 9110 §15.2.2 |
| Safe to retry automatically? | Not applicable |
| Related headers | Upgrade, Connection: Upgrade, Sec-WebSocket-Accept |
What causes HTTP 101?
- A WebSocket handshake (Upgrade: websocket, Connection: Upgrade).
- A legacy h2c (cleartext HTTP/2) upgrade.
How do I fix HTTP 101?
- If WebSockets fail behind a proxy, the proxy must forward the Upgrade and Connection headers. In Nginx: proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade";
- Raise proxy read timeouts (Nginx proxy_read_timeout) so idle WebSockets are not cut off.
What should a client do after HTTP 101?
Start speaking the upgraded protocol on the same connection. If you receive 200 or 400 instead of 101, the upgrade was refused or stripped by a proxy.
Does HTTP 101 affect SEO?
No SEO impact. Crawlers do not open WebSocket connections.
Example 101 response
HTTP/1.1 101 Switching Protocols
Date: Mon, 01 Dec 2026 12:00:00 GMT
Upgrade: websocket
Connection: Upgrade
Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo= Other 1xx status codes
The request was received and processing continues. 1xx responses are interim; a final response always follows.
Frequently asked questions
Why do I get 400 or 426 instead of 101 for my WebSocket?
Does HTTP/2 use 101?
Is 101 a client or server error?
Related
- 100 Continue HTTP 100 Continue is an interim response telling the client the server has received the request headers and th.
- 426 Upgrade Required HTTP 426 Upgrade Required means the server refuses the request over the current protocol and requires the clie.
- 400 Bad Request HTTP 400 Bad Request means the server cannot process the request because of a client error, such as malformed .
- 502 Bad Gateway HTTP 502 Bad Gateway means a server acting as a gateway or proxy (Nginx, a load balancer, Cloudflare) got an i.
- Open the HTTP Status Codes Reference → Free, no signup.