Alibaba Cloud CDN provides the URL redirection feature that can redirect client requests to HTTP or HTTPS.

Prerequisites

An SSL certificate is configured for the domain name. For more information, see Configure an SSL certificate.

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. Verify the result
  • Security-insensitive applications: You can enable 301 redirection to redirect HTTPS requests between clients and CDN edge nodes to HTTP.

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.

Procedure

  1. Log on to the Alibaba Cloud CDN console.
  2. In the left-side navigation pane, click Domain Names.
  3. 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.
  4. In the management pane of the domain name, click HTTPS.
  5. In the URL Redirection section, click Modify.
  6. In the URL Redirection dialog box, set the Redirect Type parameter.
    URL redirection
    Redirection type Description
    Default Supports both HTTP and HTTPS requests.
    HTTPS -> HTTP Redirects client requests from HTTPS to HTTP.
    HTTP -> HTTPS Redirects client requests from HTTP to HTTPS to secure data transmission.
  7. Click OK.