You can enable the Force Redirect function to redirect the original requests from a client to L1 as HTTP or HTTPS requests. This topic describes how to enable the Force Redirect function.
- Log on to the Alibaba Cloud CDN console.
- In the left-side navigation pane, click Domain Names.
- On the Domain Names page, find the target domain name and click Manage.
- In the left-side navigation pane of the specified domain, click HTTPS.
- In the Force Redirect section, click Modify.
- In the Force Redirect dialog box that appears, set Redirect Type.
Redirect Type Description Default CDN supports both HTTP and HTTPS requests. HTTPS -> HTTP CDN redirects the requests from a client to L1 as HTTP requests. HTTP -> HTTPS CDN redirects the requests from a client to L1 as HTTPS requests.
Assume that you set Redirect Type to HTTP -> HTTPS.When your client initiates an HTTP request, the server returns a 301 redirect response to redirect the HTTP request as an HTTPS request, as shown in the following figure.
- Click OK.