If you use an NGINX certificate when configuring an HTTPS certificate, you must force Dynamic Route for CDN (DCDN) to redirect HTTP requests to HTTPS. You can also forcibly redirect requests from clients to L1 nodes as HTTP or HTTPS requests based on your needs. This topic describes how to configure the forcible redirection feature.

Prerequisites

Make sure that an HTTPS certificate is configured. For more information, see Configure an HTTPS certificate.
Note
  • If this is the first time that you are configuring an HTTPS certificate, you must wait for the certificate to take effect before enabling HTTP/2.
  • If you disable HTTPS acceleration after enabling HTTP/2, HTTP/2 is automatically disabled.

Procedure

  1. Log on to the Dynamic Route for CDN console.
  2. In the left-side navigation pane, click Domain Names.
  3. On the Domain Names page, find the target domain name and click Configure.
  4. In the left-side navigation pane of the specified domain, click HTTPS Settings.
  5. In the Force Redirect section, click Modify.
    Force Redirect
  6. In the Force Redirect dialog box that appears, select a redirect type.
    Redirect type Description
    Default DCDN supports both HTTP and HTTPS requests.
    HTTPS to HTTP HTTPS requests from clients to L1 nodes are forcibly redirected to HTTP requests.
    HTTP to HTTPS HTTP requests from clients to L1 nodes are forcibly redirected to HTTPS requests. Select this option if you use an NGINX certificate when configuring an HTTPS certificate. You can also select this option to secure connections.
    force redirect

    In the following example, the Redirect Type parameter is set to HTTP to HTTPS.

    When a client initiates an HTTP request, the server returns a 301 redirect response to redirect the HTTP request to an HTTPS request, as shown in the following figure.Verify the configuration
  7. Click OK.