RFC 7301 / START HERE
ALPN protocol negotiation, before the details
ALPN means Application-Layer Protocol Negotiation. It is an extension to TLS, Transport Layer Security.
A client and server use it to agree which application protocol to speak inside their TLS connection. The names identify protocols, not encryption algorithms or hostnames.
The idea in one picture
Offer protocols
Choose one
Use agreed protocol
A simplified picture of the idea; the chapters explain the actual mechanisms.
Why it exists
One port can carry more than one application protocol. ALPN puts the offer and selection inside the TLS handshake instead of adding a separate application negotiation round-trip.
A familiar example
An HTTPS client can offer h2 for HTTP/2 and http/1.1. The server selects one common protocol or reports failure when there is no overlap. TLS1.3 moves the server response into an encrypted handshake message; this alone does not hide the client offer.
Helpful background
You can start here without reading another RFC. If these ideas are unfamiliar, these short introductions may help.
What you’ll learn next
Begin with chapter one, or choose a topic.
- Offer application protocolsALPN lets a TLS client offer application protocols without adding a separate negotiation round-trip.→
- Read the nested lengthsThe extension contains a two-octet list length and one-octet lengths for individual protocol names.→
- Select one protocol or stopThe server selects a client-supported protocol; no overlap produces a fatal alert.→
- Keep connection and TLS versions distinctOrdinary resumption negotiates for the new connection; TLS1.3 changes response placement and constrains early data.→
This introduction explains RFC 7301 (2014). Read the original RFC ↗