If a client requests for resources that are not cached on a CDN node, the node fetches these resources from the origin based on the origin protocol policy and caches these resources on the node. This topic describes how to configure the origin protocol policy.

Background information

When origin protocol policy is enabled, back-to-origin requests for resources use the same protocol that is used by the client to request resources. If the client sends an HTTPS request to access resources that are not cached on a CDN node, the node uses the same HTTPS protocol to request for resources from the origin. This origin protocol policy also applies to HTTP requests.

Note The origin must support both port 80 and port 443. Otherwise, the back-to-origin process may fail.

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 target domain name and click Manage.
  4. In the left-side navigation pane of the specified domain, click Back-to-origin.
  5. In the Origin Protocol Policy section, turn on Origin Protocol Policy.
  6. Click Modify.

    Static origin protocol policy
  7. In the Static Origin Protocol Policy dialog box, set Redirect Type to Follow, HTTP, or HTTPS as needed.
    • Follow: If the client sends HTTP or HTTPS requests to access resources on CDN, CDN uses the same protocol to request for resources from the origin.
    • HTTP: CDN initiates back-to-origin requests only over HTTP.
    • HTTPS: CDN initiates back-to-origin requests only over HTTPS.
  8. Click OK.