1xx Informational

HTTP 101 Switching Protocols

The server agrees to switch protocols as requested by the client, for example to WebSocket.

101 Switching Protocols confirms that the server is changing the connection to the protocol named in the client's Upgrade header. It is how every WebSocket connection starts.

HTTP/1.1 101 Switching Protocols

When servers send it

  • A WebSocket handshake: the client sends Upgrade: websocket and Connection: Upgrade.
  • An HTTP/1.1 connection upgrading to another protocol named in Upgrade.

How to handle it

  • After 101 the connection speaks the new protocol; HTTP no longer applies to it.
  • If you expect 101 but get 200 or 400, a proxy or load balancer is probably dropping the Upgrade and Connection headers.

Related status codes

Other status codes

1xx Informational

2xx Success

3xx Redirection

5xx Server error

Search all HTTP status codes