Glossary · Performance

HTTP/2

HTTP/2 is the second major HTTP version, multiplexing many requests over one connection with header compression to load pages faster than HTTP/1.1.

Updated October 5, 2026

HTTP/2 (RFC 9113) is a binary version of HTTP that carries many concurrent requests and responses, called streams, over a single TCP connection. It keeps the same methods, status codes and headers as HTTP/1.1; only the transport format changes.

Why it matters

HTTP/1.1 needed multiple connections and workarounds like domain sharding and file concatenation to load many assets in parallel. HTTP/2 removes that need through multiplexing, and shrinks repeated headers with HPACK compression. Browsers use it only over TLS, negotiated through ALPN during the handshake. One limitation remains: because it runs on TCP, a single lost packet stalls all streams (head-of-line blocking), which HTTP/3 addresses.

Example

Check what a server negotiates:

curl -sI --http2 https://example.com | head -n 1
# HTTP/2 200

Enabling it in nginx:

listen 443 ssl;
http2 on;

On older nginx versions, the directive is listen 443 ssl http2;.

Common mistakes

  • Still concatenating all files and sharding domains, which wastes the benefits of multiplexing.
  • Assuming it is on because HTTPS is. Check the actual protocol in a response.
  • Forgetting that a proxy or CDN may speak HTTP/2 to browsers but HTTP/1.1 to your origin.
  • Expecting server push to help. Browsers have dropped support for it.

Get notified when this term updates

Plus occasional practical tips on uptime and monitoring, nothing else. Unsubscribe anytime.

This page is general information written by our editorial team and updated when documentation changes. Servers and providers differ, so test changes safely first. See our editorial policy and disclaimer.