All Products
Search
Document Center

Dynamic Content Delivery Network:Configure force redirect

Last Updated:Feb 05, 2024

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

Prerequisites

An SSL certificate is configured. For more information, see Configure an SSL certificate.

Scenarios

DCDN supports 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 DCDN points of presence (POPs) 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 DCDN POPs 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

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)

Procedure

  1. Log on to the DCDN console.

  2. In the left-side navigation pane, click Domain Names.

  3. On the Domain Names page, find the domain name whose acceleration region you want to change and click Configure.
  4. In the left-side navigation tree of the domain name, click HTTPS Settings.

  5. In the Force Redirect section, click Modify.

  6. In the Force Redirect dialog box, select a redirect type.

    跟随方式

    Redirect Type

    Description

    Default

    Both HTTP and HTTPS requests are supported.

    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.