All Products
Search
Document Center

CDN:Configure URL redirection

Last Updated:Feb 19, 2024

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

  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.

  4. In the left-side navigation tree of the domain name, click HTTPS.

  5. In the URL Redirection section, click Modify.

  6. 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.

  7. Click OK.