You can configure the URL redirection feature to forcibly redirect requests from clients to POPs to HTTPS.
Prerequisites
An SSL certificate is configured. For more information, see Configure an SSL certificate.
Scenarios
For accelerated domain names for which SSL certificates are configured, you can enable URL redirection to redirect HTTP requests between clients and points of presence (POPs) to HTTPS. Compared with HTTP, HTTPS provides reinforced protection.
By default, the URL redirection 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 | Message | Description | Scenario |
301 | Moved Permanently | GET requests remain unchanged. Requests that use other methods may be changed to GET requests. | Website refactoring. |
308 | Permanent Redirect | 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). (with non-GET links/operations) |
Procedure
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.
In the left-side navigation tree of the domain name, click HTTPS.
In the URL Redirection section, click Modify.
In the URL Redirection dialog box, Configure the Redirect Type parameter.
Redirect Type
Description
Default
HTTP and HTTPS requests are supported.
HTTPS -> HTTP
Redirects requests from clients to POPs to HTTP.
HTTP -> HTTPS
Redirects requests from clients to POPs to HTTPS to secure data transmission.
Click OK.