An SNI (Server Name Indication) is used to map multiple hostnames to a Certificate. It allows Kong Gateway to select which SSL/TLS Certificate to use based on the hostname in the client request. This feature ensures that multiple domains can be securely served through the same gateway.
SNIs
Related Documentation
OpenAPI Specifications
Tags
SNI routing
When configuring a Route with a secure protocol, like HTTPS, gRPC, or TLS, you can use an SNI for routing. The SNI is determined during the TLS handshake process and will remain unchanged for the duration of the connection, so all requests will contain the same SNI regardless of the defined Header
in the Route configuration. For more information on how routing priorities are assigned read the Expressions Router documentation.
Wildcards
Valid wildcard positions for configuring SNIs are:
mydomain.*
*.mydomain.com
*.www.mydomain.com
This is especially useful when configuring TLS Routes.
Prioritization matching
The prioritization for matching SNIs to Certificates follows this order:
- Exact SNI matching certificate
- Search for a certificate by an SNI prefix wildcard
- Search for a certificate by an SNI suffix wildcard
- Search for a certificate associated with the SNI
*
- The default certificate on the file system