Application-Layer Protocol Negotiation (ALPN) is a TLS extension that lets the client and server choose which protocol will run inside the encrypted connection while the handshake is still in progress. The client offers a list of identifiers and the server replies with one.
Why it matters
ALPN is how browsers learn that a server supports HTTP/2 without an extra round trip. The client offers h2 and http/1.1; if the server selects h2, the first request is already sent over HTTP/2. HTTP/3 over QUIC uses the identifier h3 in the same way.
If ALPN is not configured, or a proxy or TLS terminator in front does not support it, clients quietly fall back to HTTP/1.1. The site still works, but multiplexing and header compression are lost, so the problem often goes unnoticed.
Example
openssl s_client -connect example.com:443 -alpn h2,http/1.1 </dev/null 2>/dev/null | grep "ALPN"
The output ALPN protocol: h2 confirms negotiation. In nginx, listening with listen 443 ssl http2; (or http2 on; in newer versions) enables it.
Common mistakes
- Enabling HTTP/2 but terminating TLS on an old proxy that lacks ALPN support.
- Checking with a tool that never offers
h2. - Expecting ALPN to work for plain-text HTTP.
Related
Get notified when this term updates
Plus occasional practical tips on uptime and monitoring, nothing else. Unsubscribe anytime.
यह पेज सामान्य जानकारी है, जिसे हमारी संपादकीय टीम ने लिखा है और दस्तावेज़ीकरण बदलने पर अपडेट किया जाता है। सर्वर और प्रदाता अलग-अलग होते हैं, इसलिए बदलाव पहले सुरक्षित तरीके से जाँचें। देखें: संपादकीय नीति और अस्वीकरण.