If the IP address of your origin server is associated with multiple domain names, and requests are redirected to the origin server over HTTPS, you must configure the Server Name Indication (SNI) feature for the origin server. SNI specifies the domain name for which requests are destined, and enables the server to return the correct certificate.
SNI is an extension of Transport Layer Security (TLS) and Secure Sockets Layer (SSL) by which a client determines which hostname it is attempting to connect to at the beginning of the handshake process. SNI allows a server to present multiple SSL certificates on the same IP address. After SNI is enabled, when a CDN edge node sends a TLS handshake request to the origin server, the origin server determines the requested domain name based on the SNI information provided by the TLS handshake request. Then, the origin server returns the correct SSL certificate.
- The origin server must be capable of parsing SNI information provided by the TLS handshake request from CDN edge nodes.
- If multiple origin servers are configured for an accelerated domain name, you can configure the SNI feature in the console. In this case, all back-to-origin requests point to the domain name that corresponds to the SNI value. If you want to set different SNI values for different origin servers, submit a ticket.
- A CDN edge node redirects a request to the origin server over HTTPS. The domain name for which the request is destined is specified by SNI.
- After the origin server receives the request, it responds with the certificate of the requested domain name based on SNI.
- After the CDN edge node receives the certificate, it establishes a secure connection to the origin server.
- Log on to the Alibaba Cloud CDN console.
- In the left-side navigation pane, click Domain Names.
- On the Domain Names page, find the domain name that you want to manage and click Manage in the Actions column of the domain name.
- In the management pane of the domain name, click Back-to-origin.
- On the Configurations tab, find the Origin SNI section and click Modify.
- In the Origin SNI dialog box, turn on Origin SNI and enter the domain name from which clients can retrieve resources, for example,
cdn.console.aliyun.com. Note SNI supports only specific domain names. Wildcard domain names are not supported.
- Click OK.