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.
- 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.
- Log on to the Dynamic Route for CDN console.
- In the left-side navigation pane, click Domain Names.
- On the Domain Names page, find the target domain name and click Configure.
- In the left-side navigation pane of the specified domain, click HTTPS Settings.
- In the Force Redirect section, click Modify.
- 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.
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.
- Click OK.