Alibaba Cloud CDN provides the URL redirection feature that can redirect client requests to HTTP or HTTPS.
Prerequisites
Scenarios
You can enable URL redirection in the following scenarios:
- Accelerated domain names that have SSL certificates configured: You can enable 301
redirection to redirect HTTP requests between clients and CDN edge nodes to HTTPS.
Compared with HTTP, HTTPS provides reinforced protection.
- Security-insensitive applications: You can enable 301 redirection to redirect HTTPS requests between clients and CDN edge nodes to HTTP.
By default, URL redirection 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 | Use scenario |
---|---|---|---|
301 | Moved Permanently | GET requests remain unchanged. Requests that use other request methods are converted 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) |
Billing rules
- If you set Redirect Type to HTTPS -> HTTP, you are charged for HTTPS requests before URL redirection. HTTP requests that are redirected from HTTPS are free of charge.
- If you set Redirect Type to HTTP -> HTTPS, you are charged for HTTPS requests that are redirected from HTTP. HTTP requests before URL redirection are free of charge.