Skip to content

1xx Informational

101 Switching Protocols

The server is switching to the protocol the client asked for, usually WebSocket.

What 101 means

The normal response to a WebSocket handshake: the client sends Upgrade: websocket and the server agrees. After this the connection speaks WebSocket, not HTTP.

Common causes

  • A WebSocket (or other Upgrade) handshake succeeded.

How to fix it

If you're calling an API

  • Nothing: this is success for WebSocket connections.

If you run the server

  • If proxies break WebSockets, make sure they forward the Upgrade and Connection headers.

Should you retry?

Not applicable: it's a success response for upgrades.

Example response

HTTP
HTTP/1.1 101 Switching Protocols

Related headers: Upgrade, Connection.

Defined in: RFC 9110 (HTTP Semantics). 101 is a informational.

HTTP 101 FAQ

What does HTTP 101 mean?

101 Switching Protocols: The server is switching to the protocol the client asked for, usually WebSocket. The normal response to a WebSocket handshake: the client sends Upgrade: websocket and the server agrees. After this the connection speaks WebSocket, not HTTP.

Is 101 a client or server error?

Neither: 101 is a informational response (1xx). Interim responses: the request was received and processing continues.

How do I fix a 101 error?

Nothing: this is success for WebSocket connections.

Should I retry after a 101?

Not applicable: it's a success response for upgrades.

Other 1xx status codes

All HTTP status codes