← Back to status codes
HTTP Status Code
101 Switching Protocols
InformationalThe server is switching protocols as requested by the client.
HTTP status code reference, response example, common causes, fixes, and related status codes.
What does HTTP 101 Switching Protocols mean?
HTTP 101 Switching Protocols is a status code sent by a server to indicate the result of an HTTP request.
Status codes help browsers, APIs, apps, and backend systems understand whether a request succeeded, failed, was redirected, or needs additional action.
In practice, HTTP 101 Switching Protocols usually appears when a server responds under specific request, validation, permission, or infrastructure conditions.
Response example
HTTP/1.1 101 Switching Protocols Upgrade: websocket Connection: Upgrade
HTTP example
HTTP/1.1 101 Switching Protocols
Relevant headers
Upgrade
Upgrade: websocket
Connection
Connection: Upgrade
Common causes
- WebSocket handshake
- Protocol upgrade request
- HTTP connection upgraded to another protocol
How to fix it
- Ensure Upgrade and Connection headers are correct
- Verify the server supports the requested protocol
Common mistakes
- Assuming the status code alone explains the full backend issue
- Ignoring related response headers that add important context
- Treating temporary errors as permanent failures
- Retrying too aggressively without checking the cause
- Debugging the frontend only when the problem is server-side
How browsers and APIs use it
Browsers, APIs, and backend services use HTTP status codes to understand the outcome of a request. Depending on the status code, an application may render content, retry a request, redirect the user, show an error, or trigger a different flow in the client or server.
Developer note
This status is common when opening WebSocket connections. If the upgrade fails, check reverse proxy settings and required headers.