HTTP 101 Switching Protocols

Informational

1xx Response — Switching Protocols

What Does HTTP 101 Mean?

HTTP 101 Switching Protocols indicates that the server is changing the protocol as requested by the client via the Upgrade header. The most common use is upgrading an HTTP connection to a WebSocket connection.

When a client sends a request with an Upgrade header (e.g., Upgrade: websocket), the server responds with 101 if it agrees to switch protocols. After the 101 response, both client and server communicate using the new protocol. This is the standard mechanism for establishing WebSocket connections.

HTTP 101 is also used for upgrading to HTTP/2 from HTTP/1.1, though this is less common as most HTTP/2 connections use ALPN (Application-Layer Protocol Negotiation) during the TLS handshake instead.

Common Causes of 101 Switching Protocols

The client sends an Upgrade header requesting a protocol switch (usually to WebSocket). The server agrees and responds with 101 before switching to the new protocol.

Common triggers: WebSocket connections (Upgrade: websocket), HTTP/2 upgrade from HTTP/1.1, and custom protocol upgrades. The Connection: Upgrade header must also be present.

How to Fix 101 Switching Protocols

HTTP 101 is handled automatically during WebSocket connections and protocol upgrades. If WebSocket connections fail, verify that: your server supports WebSocket, the upgrade headers are correctly set, reverse proxies are configured to forward WebSocket connections, and SSL/TLS certificates are valid for WSS connections.

For Nginx, add proxy_set_header Upgrade and proxy_set_header Connection to your configuration.

Related Status Codes

Frequently Asked Questions

What does HTTP 101 mean?

HTTP 101 Switching Protocols is a informational response. HTTP 101 Switching Protocols indicates that the server is changing the protocol as requested by the client via the Upgrade header. The most common use is upgrading an HTTP connection to a WebSocket co

Is HTTP 101 an error?

No, HTTP 101 is an informational response. Informational responses (inf) indicate the request was received and understood.

How do I fix HTTP 101?

HTTP 101 is handled automatically during WebSocket connections and protocol upgrades. If WebSocket connections fail, verify that: your server supports WebSocket, the upgrade headers are correctly set, reverse proxies are configured to forward WebSock

What causes HTTP 101 Switching Protocols?

The client sends an Upgrade header requesting a protocol switch (usually to WebSocket). The server agrees and responds with 101 before switching to the new protocol.

Is HTTP 101 permanent or temporary?

HTTP 101 is situational — it depends on the underlying cause. Fix the root cause to resolve it.

🔍 Check Your IP Address

While you're here, find out your public IP address, location, and ISP details instantly.

Check My IP →