Protocols
Saved & recent

ALPN

Also called: Application-Layer Protocol Negotiation

Application-Layer Protocol Negotiation is a TLS extension that lets peers agree which application protocol a connection will carry. The client offers protocol identifiers, and the server selects a supported choice. This lets services share a port without guessing the application protocol from later payload bytes.

For example, a client may offer h2 and http/1.1, and the server select h2 for HTTP/2. That selects the application protocol, not the TLS version or the hostname. The selection is part of the handshake; the exact response message depends on the TLS version.

Read first
TLS
Related
SNI, HTTPS
Further reading
RFC 7301 — TLS Application-Layer Protocol Negotiation Extension
client offers application protocols h2 http/1.1 client server h2 supported h2 selected application protocol TLS version · 1.3
Illustrative ALPN selection: the server chooses h2 from protocols both sides support. This selects HTTP/2, not the TLS version. The diagram does not assign the response to a TLS-version-specific handshake message.

View in the full Protocols collection