If you want to use Alibaba Cloud CDN to accelerate content delivery for a specified website, you must specify the website as the origin server. Then, add the domain name that you want to accelerate to Alibaba Cloud CDN. After you add a domain name to be accelerated to Alibaba Cloud CDN, the system pushes the configuration of the domain name to all edge nodes without affecting the services of the domain name.

For more information about the health check policies on origin servers, see Configure a health check policy for an origin server.

Prerequisites

  1. An origin server with stable performance is deployed.
    Note If the accelerated region is Mainland China Only or Global, you must apply for an Internet Content Provider (ICP) number for the domain name. If the domain name does not have an ICP number, you can apply for an ICP number in Alibaba Cloud ICP Filing System.
  2. Alibaba Cloud CDN is activated. For more information, see Activate Alibaba Cloud CDN.

Step 1: Complete basic settings and specify business information

  1. Log on to the Alibaba Cloud CDN console.
  2. In the left-side navigation pane, click Domain Names.
  3. Click Add Domain Name and set the following parameters.
    Note The first time a domain name is added to Alibaba Cloud CDN, Alibaba Cloud CDN must verify the ownership of the domain name. Alibaba Cloud CDN verifies the ownership only of the root domain name. For more information, see Verify the ownership of a domain name. If the root domain name has already passed ownership verification, ignore this message.
intl
Parameter Description
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.
  • Domain name format:
    • The domain name must be 1 to 67 characters in length.
    • The domain name can contain lowercase letters, digits, and hyphens (-). Example: example.com.
    • The domain name cannot contain Chinese characters, uppercase letters, or characters other than hyphens (-). The domain name cannot be a hyphen (-). A hyphen (-) in a domain name cannot be followed by another hyphen (-). The domain name cannot start or end with a hyphen (-). If the domain name contains Chinese characters such as 阿里云.网址, you must apply for an ICP number for the domain name in Chinese characters, and use the tool Punycode 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 the problem persists, submit a ticket.
    • 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 match a wildcard domain name, 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.

    If the system prompts that the domain name has been added to another Alibaba Cloud service, such as ApsaraVideo VOD or Dynamic Route for CDN (DCDN), you can submit a ticket to resolve this issue.

  • Each Alibaba Cloud account can add at most 50 domain names to Alibaba Cloud CDN.
    Note If the average daily peak bandwidth values of your domain names exceed 50 Mbit/s, you can submit a ticket to add more domain names to Alibaba Cloud CDN. Make sure that the increase in domain names does not cause business risks.
  • 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.
  • Domain name 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 Mainland China 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. If you want 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 Type
Notice The business type cannot be modified after it is set. Proceed with caution.
  • Image and small file distribution: accelerates the delivery of small-sized static content on websites, such as e-commerce content and game images.
  • Large file distribution: accelerates the delivery of static files that are larger than 20 MB.
  • On-demand audio and video streaming: accelerates the delivery of audio or video content.
  • DCDN: accelerates the delivery of both static and dynamic content. Dynamic Route for CDN (DCDN) can accelerate the delivery of large amounts of dynamic content.

    If you set Business Type to DCDN, you must follow the instructions to configure the domain name in the DCDN console. For more information, see Add a domain name.

Region
  • Mainland China Only: All requests are scheduled to edge nodes that are deployed in the Chinese mainland. Requests from 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 Mainland China): All requests are scheduled to edge nodes that are deployed in Hong Kong (China), Macao (China), Taiwan (China), or 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, or Hong Kong (China).
Notice
  • If you select Mainland China Only or Global, you must apply for an ICP number for the accelerated domain name. We recommend that you use Alibaba Cloud ICP Filing System to apply for ICP numbers. The Ministry of Industry and Information Technology (MIIT) may not immediately update the data in the database after you submit domain name information. We recommend that you configure the domain name eight hours after you submit the domain name information.
  • The pricing varies based on the accelerated region. Choose an accelerated region based on your business requirements. For more information about the pricing of Alibaba Cloud CDN, see CDN pricing.

Step 2: Set up origin servers

  1. After you complete the basic settings and specify business information, click Add Origin Server.
  2. In the Add Origin Server dialog box, set the following parameters.
    Set up origin servers
    Parameter Description
    Origin Info

    Select the type of the origin server and enter the address of the origin server.

    • Address length: The address of an origin server cannot exceed 67 characters in length.
    • Maximum number of origin servers: You can set at most 20 origin server addresses for each accelerated domain name.
    • OSS Domain Name
      • If you use an Object Storage Service (OSS) bucket as the origin server, you can enter the public endpoint of the OSS bucket, for example, ***.oss-cn-hangzhou.aliyundoc.com. Internal endpoints of OSS buckets are not supported.
      • 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.
      Note Discounts for data transfer between Alibaba Cloud CDN and OSS:
      • If you want OSS to identify network traffic sent from Alibaba Cloud CDN and apply for a discount on the data transfer, you must set the origin server type to OSS Domain in the Alibaba Cloud CDN console.
      • If you set the origin server type to Site Domain in the Alibaba Cloud CDN console, OSS identifies network traffic sent from Alibaba Cloud CDN as outbound data transfer over the Internet. In this case, the discounts do not apply.

      For more information, see Billing of OSS content acceleration.

    • IP: Enter the public IP addresses of one or more servers. Public IP addresses of Alibaba Cloud Elastic Compute Service (ECS) instances do not need to be reviewed.
    • Site Domain: Enter the domain names of one or more origin servers.
      Note
      • The origin domain name must be different from the accelerated domain name. If the origin domain name is the same as the accelerated domain name, a DNS resolution loop occurs, and requests cannot be redirected to the origin server.
      • The domain name must be in lowercase letters.
      • If the domain name contains Chinese characters such as 阿里云.网址, you must apply for an ICP number for the domain name in Chinese characters, and use the tool Punycode to convert the domain name from Chinese characters to English letters, such as xn--fiq****.xn--eq****. Then, you can specify it as the domain name to be accelerated.
    • Function Compute Domain: Enter a Function Compute domain name that belongs to the current Alibaba Cloud account. You must set the Region and Domain Name parameters for the Function Compute domain name. For more information, see Configure a custom domain name.
    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 have specified two origin servers: Server A and Server B. Server A is the primary origin server and Server B is the secondary origin server. In this case, Alibaba Cloud CDN preferably redirects requests to 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 fails back 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 valid values of origin server weights are 1 to 100. A greater value indicates a higher weight. An origin server with a higher weight receives more user requests.
    • Default value: 10.

    For example, both Origin Server A and Origin Server B are specified as primary origin servers. The weight of Origin Server A is 80 and the weight of Origin Server B is 20. In this case, Alibaba Cloud CDN redirects user requests to both origin servers at a ratio of 8:2.

    Port
    Specify a port on the origin server to process requests. The default port is port 80. You can specify a port based on the settings of your origin server. Valid values are 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 you want Alibaba Cloud CDN to redirect HTTPS requests to origin servers over custom ports, submit a ticket.
    • 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 Object Storage Service (OSS) bucket, OSS determines whether you can specify a custom port.
  3. After the configuration is complete, click OK.
  4. Optional:You can repeat the preceding steps to add more origin servers.

Step 3: Complete ownership verification

  1. After you add an origin server, click Next.
  2. Wait for manual verification.
    Note If the domain name does not need to be manually verified, proceed to the next step. In the next step, you can set the parameters based on your business requirements.

    It takes one to two business days to complete the verification. If you require prioritized verification, submit a ticket.

    After the domain name passes the verification, the status of the domain name changes to Enabled. In this case, the domain name is added to Alibaba Cloud CDN.

Configure a health check policy for an origin server

CDN edge nodes provide Layer 4 (TCP) health checks on origin servers. CDN edge nodes perform health checks on origin servers to check the availability of the origin servers in case back-to-origin routing fails.

If a user sends a Layer 4 connection request to the same IP address and port for two consecutive times, and the origin server is unavailable due to reasons such as connection failures or timeouts for both times, Alibaba Cloud CDN moves the IP address of the origin server from the back-to-origin routing address list to the dead table. Meanwhile, Alibaba Cloud CDN attempts to access origin servers in descending order of priority. If origin servers have the same priority, they are prioritized based on their weights. If the IP address of an origin server remains unavailable for two consecutive times, a scheduled task is started. The task sends Layer 4 TCP probes to the IP address every 5 seconds. The IP address is added to the available IP list only after a TCP connection to the IP address is established.
Note
  • Probes are sent to IP addresses. If the address of an origin server is a domain name, Alibaba Cloud CDN accesses the secondary origin server only if all the IP addresses that belong to the domain name are unavailable.
  • Probes automatically skip origin servers that are in the dead table.

What to do next

Add a CNAME record for a domain name: After a domain name is added to Alibaba Cloud CDN, Alibaba Cloud CDN assigns a CNAME to the domain name. You must add a CNAME record for the domain name before CDN acceleration can take effect.

Note We recommend that you perform the following operations before you Add a CNAME record for a domain name:

Related API operations

Feature API operation
Add domain names
Verify domain name ownership