If you want to use Alibaba Cloud Content Delivery Network (CDN) to accelerate the delivery of content on a specified website, specify the website as the origin server. Then, add the domain name that you want to accelerate to Alibaba Cloud CDN. Alibaba Cloud CDN retrieves resources from the origin server and caches them on CDN nodes. This allows users to retrieve the resources from the nearest CDN nodes. After you add the domain name to Alibaba Cloud CDN, the system pushes the configuration of the domain name to all CDN nodes without affecting services of the domain name.

Prerequisites

Alibaba Cloud CDN is activated. For more information about how to activate Alibaba Cloud CDN, see Activate Alibaba Cloud CDN.

Procedure

Note Beginning February 13, 2020, Alibaba Cloud CDN no longer supports the Live Streaming option when you set the Business Type parameter. If you want to accelerate live streaming content for a domain name, log on to the ApsaraVideo Live console to add and configure the domain name. For more information, see Add a domain name.
  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, click Add Domain Name.
  4. On the Add Domain Name page, set the parameters for the domain name that you want to add.
    intl
    Parameter Description
    Domain Name to Accelerate
    Enter the domain name that you want to add, such as example.com. Take note of the following limits:
    • You can specify a domain name or a wildcard domain name. The domain name must be in lowercase letters, such as cdntest.example.com. Chinese characters are not supported.
    • You can specify a wildcard domain name, such as *.example.com. For more information about the rules for adding wildcard domain names, see Rules for adding wildcard domain names.
      Note
      • The specified wildcard domain name and the domain names that match the wildcard domain name must belong to the same Alibaba Cloud account. When you add a domain name to Alibaba Cloud CDN, Alibaba Cloud CDN verifies the ownership of the domain name. If the specified wildcard domain name and the domain names that match the wildcard domain name belong to different Alibaba Cloud accounts, an error message appears. To request technical support from Alibaba Cloud, submit a ticket.
      • If a wildcard domain has never been 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.
    • You cannot add a duplicate domain name to Alibaba Cloud CDN.

      If a DomainAlreadyExist error occurs, check whether the domain name is already added to other Alibaba Cloud services such as ApsaraVideo VOD, ApsaraVideo Live, Dynamic Route for CDN (DCDN), Secure CDN (SCDN), and Video Surveillance. You can also submit a ticket to report this issue.

    • You can add at most 50 domain names to Alibaba Cloud CDN for each Alibaba Cloud account.

      However, if the sum of the average daily peak bandwidth values of your domain names exceeds 50 Mbit/s, you can submit a ticket to add more domain names to Alibaba Cloud CDN. Make sure that the increase of 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, see Limits.
    Business Type
    • Image and small file distribution: accelerates the delivery of small-sized static content on websites, such as e-commerce content and game images.
    • Delivery of large files: accelerates the delivery of static files that are larger than 20 MB.
    • ApsaraVideo for VOD: accelerates the delivery of audio or video content.
    • DCDN: accelerates the delivery of both static and dynamic content. DCDN can accelerate the delivery of large amounts of dynamic content.

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

    Origin Info Enter the information about the origin server. If the requested resources are not cached on CDN nodes, requests are redirected to the origin server to retrieve the resources.
    • OSS Domain

      If your resources are stored in an Object Storage Bucket (OSS) bucket, you can enter the public endpoint of the OSS bucket, for example, xxx.oss-cn-hangzhou.aliyuncs.com. Internal endpoints of OSS buckets are not supported. You can view the public endpoint of an OSS bucket in the OSS console. You can also select an OSS bucket that belongs to the current Alibaba Cloud account from the Domain Name drop-down list.

    • 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 domain name of the origin server cannot be the same as the domain name to be accelerated. Otherwise, a DNS resolution loop occurs and requests cannot be redirected to the origin server.
    • Function Compute Domain

      Enter a Function Compute domain name. You must set the Region and Domain Name parameters for the Function Compute domain name. For more information, see Overview.

    Port Select a port based on the specified origin server.
    • Port 80: Requests are redirected to the origin server through port 80.
    • Port 443: Requests are redirected to the origin server through port 443. Make sure that the origin server supports HTTPS.
    Region Select an accelerated region. If you select Mainland China Only or Global, you must apply for an Internet Content Provider (ICP) number for the domain name. We recommend that you use Alibaba Cloud ICP Filing System to apply for ICP numbers. It may take some time to update data in the database of Ministry of Industry and Information Technology (MIIT). After you submit domain name information to MIIT, we recommend that you wait 8 hours before you configure the domain name in Alibaba Cloud CDN.
    Note The pricing strategies vary 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.
    • Mainland China Only: All requests are redirected to CDN nodes that are deployed in mainland China.
    • Global: All requests are redirected to the nearest CDN nodes.
    • Global (Excluding Mainland China): All requests are redirected to CDN nodes that are deployed outside mainland China.
  5. Click Next.
    If this is the first time the domain name is added to Alibaba Cloud CDN, Alibaba Cloud CDN must verify the ownership of the domain name. If the domain name has already passed the verification, skip this step. For more information, see Verify the ownership of a domain name.
  6. Wait for manual verification.

    It takes one to two business days to verify the ownership of a domain name. If the origin server is an ECS instance or an OSS bucket, you can submit a ticket. It takes less time to verify the ownership of an ECS instance or an OSS bucket.

    After the domain name passes the verification, you can check the status of the domain name on the Domain Names page. If the domain name is in the Enabled state, it indicates that the domain name is added to Alibaba Cloud CDN.

What to do next

Configure a cache expiration rule

Related API operations

  • AddCdnDomain: Adds one domain name to Alibaba Cloud CDN at a time.
  • BatchAddCdnDomain: Adds multiple domain names to Alibaba Cloud CDN at a time.