ApsaraVideo Media Processing (MPS) supports accelerated content delivery for resources on a specific website. If you want to accelerate content delivery for resources on a specific website, we recommend that you specify the website as the origin server and add the domain name that you want to accelerate to Alibaba Cloud CDN. You can add a domain name for CDN only in the Alibaba Cloud CDN console. This topic describes how to add a domain name for CDN in the Alibaba Cloud CDN console. Then, you can use this domain name for CDN to accelerate content delivery in MPS.

Prerequisites

Alibaba Cloud CDN is activated. If not, activate this service. For more information, see Activate Alibaba Cloud CDN.

Procedure

  1. Log on to the Alibaba Cloud CDN console.
  2. In the left-side navigation pane, click Domain Names. On the page that appears, click Add Domain Name.
  3. Configure the domain name.
    1. Set the Domain Name to Accelerate, Business Type, Region, and Resource Groups parameters. Add Domain Name wizard
      ParameterDescription
      Domain Name to Accelerate
      • Domain name type: The domain name to be accelerated can be a specific domain name such as example.aliyundoc.com or a wildcard domain name such as *.aliyundoc.com.
      • Format:
        • A domain name must be in lowercase letters such as example.com. Domain names that contain uppercase letters are invalid.
        • If the domain name contains Chinese characters such as aliyun.com, you must apply for an ICP number for the domain name, and use the Punycode tool to convert the domain name to English letters, such as xn--fiq****.xn--eq****. Then, you can specify it as the domain name to be accelerated.
      • Requirements for wildcard domain names:
        • Alibaba Cloud CDN supports wildcard domain names. For more information about the limits on wildcard domain names, see Does Alibaba Cloud CDN support wildcard domain names?
        • The specified wildcard domain name and the domain names that match the wildcard domain name must belong to the same Alibaba Cloud account.
        • If a wildcard domain name is not added to Alibaba Cloud CDN, you can add domain names that match the wildcard domain name to Alibaba Cloud CDN by using different Alibaba Cloud accounts.
        • Each wildcard domain name can match up to 500 specific domain names. If more than 500 specific domain names are matched, only the first 500 specific domain names can acquire the settings of the wildcard domain name. Other domain names cannot be accelerated by Alibaba Cloud CDN.
          Note The first 500 specific domain names that match the wildcard domain name can be accelerated by Alibaba Cloud CDN.
      • You cannot add duplicate domain names to Alibaba Cloud CDN.
      • Each Alibaba Cloud account can add a maximum of 50 domain names to Alibaba Cloud CDN.
      • The content delivered from the domain name must be legal and comply with the Terms of Service for Alibaba Cloud CDN. For more information about the limits, see Limits.
      • Length: A domain name cannot exceed 67 characters in length.
      • ICP filing: If the accelerated region of a domain name is set to Global or Chinese Mainland Only, you must apply for an ICP number for the domain name. We recommend that you use Alibaba Cloud ICP Filing System to apply for ICP numbers.
      • Domain name reclaiming: If your domain name remains disabled for 120 days, Alibaba Cloud CDN automatically deletes the configuration records that are related to the domain name. This rule also applies to domain names that fail ownership verification. To continue using the domain name, you can log on to the Alibaba Cloud CDN console to add the domain name to Alibaba Cloud CDN again.
      • Domain name disabling: For more information, see Rules for disabling accelerated domain names.
      Business TypeSelect VOD from the drop-down list.
      Region
      • Chinese Mainland Only: All requests are scheduled to edge nodes that are deployed in the Chinese mainland. Requests from regions outside the Chinese mainland are scheduled to edge nodes managed by China Telecom (East China Division).
      • Global: All requests are scheduled to the nearest edge nodes.
      • Global (Excluding the Chinese Mainland): All requests are scheduled to edge nodes that are deployed in Hong Kong (China), Macao (China), Taiwan (China), and other countries or regions outside the Chinese mainland. However, requests from the Chinese mainland are scheduled to edge nodes that are deployed in Japan, Singapore, and Hong Kong (China).
      Resource GroupsSelect the resource group to which the accelerated domain name belongs from the drop-down list.
      Note If you have never added domain names to Alibaba Cloud CDN, the Resource Groups parameter is not displayed. To use the resource group feature, log on to the Resource Management console, follow the on-screen instructions to enable the resource group feature, and then create a resource group. For more information, see Create a resource group.
    2. Click Add Origin Server to add an origin server. Add Origin Server dialog box
      ParameterDescription
      Origin InfoSelect OSS Domain. You can enter the public endpoint that is used to access the bucket over the Internet, such as example-bucket-****.oss-cn-hangzhou.aliyuncs.com. To view the public endpoint of an OSS bucket, log on to the OSS console. You can also select the endpoint of an OSS bucket that belongs to the current Alibaba Cloud account from the Domain Name drop-down list. Internal endpoints of OSS buckets are not supported.
      Priority

      You can set priorities to specify primary and secondary origin servers. The primary origin server has a higher priority than the secondary origin servers. Alibaba Cloud CDN preferably redirects requests to the primary origin server.

      For example, you specify two origin servers: Origin Server A and Origin Server B. Origin Server A is the primary origin server and Origin Server B is the secondary origin server. In this case, Alibaba Cloud CDN preferably redirects requests to Origin Server A. If Origin Server A fails, Alibaba Cloud CDN redirects user requests to Origin Server B. After Origin Server A recovers, Alibaba Cloud CDN redirects requests to Origin Server A.

      Weight
      If origin servers have the same priority, Alibaba Cloud CDN redirects requests to the origin servers based on their weights. This balances loads among the origin servers. You can specify a weight based on your business requirements.
      • The weight of an origin server ranges from 1 to 100. An origin server that has a higher weight receives more requests.
      • Default value: 10.

      For example, you specify Origin Server A and Origin Server B as primary origin servers. If the weight of Origin Server A is 80 and that of Origin Server B is 20, Alibaba Cloud CDN redirects 80% of requests to Origin Server A and 20% of requests to Origin Server B.

      Port
      The port on the origin server that processes requests. The default port is port 80. You can specify a port based on the settings of your origin server. Valid values: 1 to 65535.
      • Default value: 80.
      • If you specify port 443, requests are redirected to the origin server over HTTPS. If you specify port 80 or a custom port, requests are redirected to the origin server over HTTP.
      Note
      • If Origin Protocol Policy is enabled, custom ports do not take effect. For more information about how to disable the origin protocol policy, see Configure the origin protocol policy.
      • If the origin server is an OSS bucket, OSS determines whether you can specify a custom port.
    3. Click OK.
  4. Click Next. If you have never added domain names to Alibaba Cloud CDN, Alibaba Cloud CDN verifies the ownership of the domain name. For more information, see Verify the ownership of a domain name. If the ownership of the domain name is verified, skip this step.
  5. Wait for manual verification. You need to wait for one to two business days before the ownership of a domain name is verified. If the origin server is an Elastic Compute Service (ECS) instance or an OSS bucket, the verification takes a shorter period of time. After the domain name is verified, you can view the domain name on the Domain Names page. If the domain name is in the Enabled state, the domain name is added as expected.
  6. Configure CNAME record. After the domain name is added to Alibaba Cloud CDN, Alibaba Cloud CDN assigns a CNAME to the domain name. Content delivery acceleration takes effect only after you add the CNAME record for the domain name. For more information, see Add a CNAME record for a domain name.
  7. Configure the origin host.
    1. In the left-side navigation pane, click Domain Names.
    2. On the Domain Names page, find the domain name that you want to manage and click Manage in the Actions column.
    3. In the left-side navigation pane, click Back-to-origin.
    4. In the Origin Host section, click Modify.
    5. Turn on Origin Host and select Origin Domain for the Domain Type parameter.
      Note The origin domain is the domain name of the origin server to which Alibaba Cloud CDN redirects requests, such as example.com. If you set the Domain Type parameter to Origin Domain, the domain name of the origin host is specified as the origin domain name, such as example.com.
    6. Click OK.
  8. Enable the video seeking feature.
    1. In the left-side navigation pane, click Domain Names.
    2. On the Domain Names page, find the domain name that you want to manage and click Manage in the Actions column.
    3. In the left-side navigation pane, click Video.
    4. In the Video Seeking section, turn on Video Seeking.
      Note After you enable the video seeking feature, Alibaba Cloud CDN supports seeking to a specified position during the playback of an MP4 or FLV file on ApsaraVideo Player for Web. M3U8 files support video seeking even if you have not enabled the video seeking feature in Alibaba Cloud CDN.
    After you configure a domain name for CDN, access to the specified website is accelerated.