Alibaba Cloud CDN provides the URL redirection feature that can redirect client requests to HTTP or HTTPS.
- For accelerated domain names that have SSL certificates configured, you can enable 301 redirection to redirect HTTP requests between clients and Dynamic Route for CDN (DCDN) nodes to HTTPS. Compared with HTTP, HTTPS provides reinforced protection.
- For security-insensitive applications, you can enable 301 redirection to redirect HTTPS requests between clients and DCDN nodes to HTTP.
By default, the force redirect feature uses the HTTP 301 status code. You can change the HTTP status code to 308. To change the HTTP status code, submit a ticket.
|HTTP status code||Description||Processing method||Use scenario|
|301||Moved Permanently||GET requests remain unchanged. Requests that use other request methods may be changed to GET.||Website refactoring.|
|308||Permanent Redirect||Both the request method and message body remain unchanged.||Website refactoring. This HTTP status code is suitable for requests that use request methods other than GET (with non-GET links/operations).|
- If you set Redirect Type to HTTPS to HTTP, you are charged for HTTPS requests before redirection. HTTP requests that are redirected from HTTPS are free of charge.
- If you set Redirect Type to HTTP to HTTPS, you are charged for HTTPS requests that are redirected from HTTP. HTTP requests before redirection are free of charge.
- Log on to the DCDN 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 Configure in the Actions column.
- In the left-side navigation pane on the details page of the specified domain name, click HTTPS Settings.
- In the Force Redirect section, click Modify.
- In the Force Redirect dialog box, select a Redirect Type.
Redirect type Description Default Both HTTP and HTTPS requests are supported. HTTPS to HTTP Redirects client requests from HTTPS to HTTP. HTTP to HTTPS Redirects client requests from HTTP to HTTPS for secure data transmission.
- Click OK.