All Products
Search
Document Center

CDN:Create a status code expiration rule that honors origin

Last Updated:Feb 29, 2024

If you want to set the TTL for static content cached on Alibaba Cloud CDN points of presence (POPs) based on the status code returned from an origin server, you can create a cache rule for the status code that honors origin.

Background information

When you create a status code expiration rule that honors origin, take note of the following limits:

  • If the Expires and Cache-Control headers are included in a response from the origin server, the TTL that is specified by the response headers overwrites that configured in the Alibaba Cloud CDN console.

  • The TTL of a status code is measured in seconds.

Important
  • You can configure the Status Code Expiration (Origin Cache Policy Prioritized) or Expire In parameter based on your business requirements.

  • Alibaba Cloud CDN supports only one status code expiration rule that honors origin. To set the TTL for multiple status codes, separate multiple key-value pairs with commas (,).

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

  5. Click Status Code Expiration.Status Code Expiration

  6. In the Status Code Expiration (Origin Cache Policy Prioritized) section, click Create Rule.

  7. Configure Rules.单个状态码过期时间

  8. Click OK.