Alibaba Cloud CDN follows the protocol specified by the origin protocol policy to retrieve resources from an origin server. After you configure the origin protocol policy, Alibaba Cloud CDN points of presence (POPs) redirect requests based on the origin protocol policy. In general, HTTP requests are redirected to port 80 and HTTPS requests are redirected to port 443. If this does not meet your unique requirements, you can configure custom HTTP and HTTPS ports.

Feature overview

Disable the feature

By default, the origin protocol policy feature is disabled. The origin protocol is determined by the origin port specified in Configure an origin server.
  • If port 443 is used, requests are redirected to the origin server over HTTPS.
  • If port 80 or a custom port is used, requests are redirected to the origin server over HTTP.
Note
This feature does not take effect in either of the following cases:
  • Origin Protocol Policy is turned on, but no origin protocol policy is configured.
  • The origin protocol policy is configured, but Origin Protocol Policy is not turned on.

This feature takes effect only when Origin Protocol Policy is turned on and the origin protocol policy is configured.

Enable the feature

  • Turn on Origin Protocol Policy: If Origin Protocol Policy is turned on but no origin protocol policy is configured, this feature is not enabled. The origin protocols are the same as those in Disable the feature. Turn on the switch only
  • Turn on Origin Protocol Policy and set Redirect Type to HTTP: Requests are redirected to the origin server over HTTP to port 80.
  • Turn on Origin Protocol Policy and set Redirect Type to HTTPS: Requests are redirected to the origin server over HTTPS to port 443.
  • Turn on Origin Protocol Policy and set Redirect Type to Follow:
    • If the request is sent over HTTP, it is redirected to port 80 of the origin server.
    • If the request is sent over HTTPS, it is redirected to port 443 of the origin server.

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.
    Domain Names
  4. In the left-side navigation pane of the domain name, click Back-to-origin.
  5. In the Origin Protocol Policy section, turn on Origin Protocol Policy.
  6. Click the Modify.
  7. In the Static Origin Protocol Policy dialog box, set Redirect Type to Follow, HTTP, or HTTPS based on your business requirements.
    Static origin protocol policy
    Parameter Description
    Follow When a client sends an HTTP or an HTTPS request, Alibaba Cloud CDN redirects the request to the origin server over the protocol used by the client. Make sure that both port 443 and port 80 are open on the origin server. Otherwise, Alibaba Cloud CDN may fail to redirect client requests to the origin server.
    Note
    • The origin protocol policy protects data from tampering and eavesdropping during transmission. If you want to transmit sensitive data such as user identity data over HTTPS, and other data such as image files over HTTP, we recommend that you set Redirect Type to Follow.
    • You can configure custom HTTP and HTTPS ports.
    HTTP Alibaba Cloud CDN redirects requests to the origin server only over HTTP.
    Note If you set Redirect Type to HTTP, port 80 is used by default. You can also specify a custom port.
    HTTPS Alibaba Cloud CDN redirects requests to the origin server only over HTTPS.
    Note
    • HTTPS encryption imposes additional load on computing resources on the origin server.
    • If you set Redirect Type to HTTPS, port 443 is used by default. You can also specify a custom port.
  8. Click OK.