← All headersGeneral header

What is an Upgrade header?

Asks to switch the current connection to a different protocol, such as from HTTP/1.1 to WebSocket.

The Upgrade header is how a plain HTTP connection to a website becomes something else entirely, most commonly a WebSocket for real-time features like chat or live dashboards. Because the upgrade either succeeds cleanly or the whole connection breaks, a monitor that specifically exercises the upgrade handshake is far more useful here than one that only checks the initial HTTP response looks healthy.

Common use case

A chat or live-dashboard client sends Upgrade: websocket to convert a plain HTTP connection into a persistent, bidirectional WebSocket for real-time updates.

Example

Upgrade: websocket

History

Part of the original HTTP/1.1 specification, RFC 2068 (1997), later central to the WebSocket handshake defined in RFC 6455 (2011).

Did you know?

HTTP/2 forbids this header entirely - connections that need to negotiate a protocol switch under HTTP/2 use a different, frame-based mechanism instead.