All Products
Search
Document Center

CDN:Add a domain name

Last Updated:Sep 13, 2023

If you want to use Alibaba Cloud CDN to accelerate content delivery for a specified website, you need to add the domain name that you want to accelerate to Alibaba Cloud CDN. After you add a domain name to Alibaba Cloud CDN, the system pushes the configuration of the domain name to all points of presence (POPs) without affecting the services of the domain name.

Prerequisites

  1. An origin server that provides stable performance is deployed. The domain name that you want to accelerate is available.

    Note

    If the accelerated region is Chinese Mainland Only or Global, you need to apply for an Internet Content Provider (ICP) number for the domain name. If the domain name does not have an ICP number, you can perform ICP filing by using Alibaba Cloud ICP Filing System.

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

Step 1: Configure business information

  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. On the Add Domain Names page, configure parameters in the Basic Information and Business Information sections.

    Note

    The first time a domain name is added to Alibaba Cloud CDN, Alibaba Cloud CDN verifies the ownership of the root domain. For more information, see Verify the ownership of a domain name. If you have already verified your domain, skip this operation.

intl

Parameter

Description

Region

  • Chinese Mainland Only: All requests are redirected to POPs that are deployed in the Chinese mainland. Requests from outside the Chinese mainland are redirected to POPs that are managed by China Telecom (East China Division).

  • Global: All requests are redirected to the nearest POPs.

  • Global (Excluding the Chinese Mainland): All requests are redirected to POPs 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 redirected to POPs that are deployed in Japan, Singapore, or Hong Kong (China).

Important
  • If you select Chinese Mainland Only or Global, you need to apply for an ICP number for the domain name. We recommend that you apply for ICP numbers in Alibaba Cloud ICP Filing System. After you submit the domain name information, the Ministry of Industry and Information Technology (MIIT) may not immediately update the data in the database. 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. Select an accelerated region based on your business requirements. For more information about the pricing of Alibaba Cloud CDN, see CDN Pricing.

Global Resource Plan

If you set Region to Global (Excluding the Chinese Mainland) and enable Global Resource Plan, you can use more POP resources on POPs for your domain name. For more information, see Enable global resource plan.

Domain Name to Accelerate

  • Domain name type: The domain name that you want to accelerate 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 perform ICP filing for the Chinese domain name. Then, use the Punycode tool to convert the domain name into English characters such as xn--fiq****.xn--eq****. Specify the converted domain name as the domain name to be accelerated.
  • Requirements for wildcard domain names:
    • Alibaba Cloud CDN supports wildcard domain names. For information about the limits on wildcard domain names, see Does Alibaba Cloud CDN support wildcard domain names?
    • The wildcard domain name that you specify and the domain names that match the wildcard domain name must belong to the same Alibaba Cloud account. Otherwise, an error message appears when you add domain names.
    • If a wildcard domain name is not added to an Alibaba Cloud account, you are allowed to add the subdomains of the wildcard domain name to multiple 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 domain names that have been added to other Alibaba Cloud services.

    If the system prompts that the domain name is added to other Alibaba Cloud services such as ApsaraVideo VOD and Dynamic Content Delivery Network (DCDN), you can transfer the domain name to Alibaba Cloud CDN. For more information, see Transfer a domain name to another Alibaba Cloud account.

  • Each Alibaba Cloud account can add up to 50 domain names to Alibaba Cloud CDN.
    Note However, if the average daily peak bandwidth of your domain names exceeds 50 Mbit/s, you can request to add more domain names by following the method described in Quota management. Make sure that the increase of domain names does not cause business risks.
  • The content that is delivered from the domain name must be legal and compliant with the Terms of Service for Alibaba Cloud CDN. For more information about the limits, see Limits.
  • ICP filing: If you set the acceleration region of a domain name 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. For more information, see Prepare and check the instance and access information.
  • Domain name reclaiming: If your domain name is disabled for 120 days, Alibaba Cloud CDN 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 must go to the Alibaba Cloud CDN console to add the domain name again.
  • Domain name disabling: For more information, see Rules for disabling accelerated domain names.
  • Sandbox: If an accelerated domain name is under attack, such as DDoS attacks or HTTP flood attacks, or faces significant increases in bandwidth or QPS due to traffic spikes that have not been reported to Alibaba Cloud, Alibaba Cloud CDN has the right to determine whether to add the attacked domain name to a sandbox based on factors such as the service status of the domain name and the impact of the attack. This ensures that the acceleration services of other users can work as expected. For more information, see Introduction to sandboxes. If the attack is severe, other accelerated domain names in the same account are also added to the sandbox, and the addition of new domain names to the account is restricted.

Business Type

  • Image and Small File: accelerates the delivery of small-sized static content on websites, such as e-commerce content and game images.

  • Large File Download: accelerates the delivery of static files that are larger than 20 MB.

  • VOD: accelerates the delivery of audio or video content.

  • DCDN: accelerates the delivery of both static and dynamic content. Dynamic Content Delivery Network (DCDN) can accelerate the delivery of large amounts of dynamic content.

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

Note

After you configure the Business Type parameter, you cannot modify the parameter.

Step 2: Set up origin servers

  1. After you configure parameters in the Basic Information and Business Information sections, click Add Origin Server.

  2. In the Add Origin Server dialog box, configure the parameters that are described in the following table.

    配置源站信息

    Parameter

    Description

    Origin Info

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

    • OSS domain name

      • If your origin server is an Object Storage Service (OSS) bucket, you can select or enter the public domain name of the OSS bucket, such as ***.oss-cn-hangzhou.aliyuncs.com. Alibaba Cloud CDN does not support internal domain names of OSS buckets.

      • You can obtain the public domain name of an OSS bucket in the OSS console. You can also select the domain name 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 that is sent from Alibaba Cloud CDN and apply for a discount on the data transfer, you need to 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 that is 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 address: You can configure one or more IP addresses for an origin server. Internal IP addresses are not supported. IPv4 addresses and IPv6 addresses are supported. At least one of the IP addresses must be an IPv4 address. If you use a public IP address of an Alibaba Cloud Elastic Compute Service (ECS) instance as the address of the origin server, the IP address is exempt from manual review.

    • 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. Otherwise, a DNS resolution loop occurs, and requests cannot be redirected to the origin server.

      • The format of the origin domain name:

        • The domain name must be 1 to 67 characters in length,

        • and can contain lowercase letters, digits, and hyphens (-). Example: example.com.

        • The domain name cannot contain Chinese characters, uppercase letters, or special characters other than hyphens (-). The domain name cannot be only 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 Punycode tool to convert the Chinese characters into English letters, such as xn--fiq****.xn--eq****. Then, you can specify the converted domain name as the domain name that you want to accelerate.

      • You can add the address of an Alibaba Cloud Application Load Balancer (ALB) instance, such as example.hangzhou.alb.aliyuncs.com, as the address of an origin server.

    • Function Compute Domain: Enter a Function Compute domain name that belongs to the current Alibaba Cloud account. If you select this value, you need to configure the Region and Domain Name parameters. For more information, see Configure a custom domain name.

    Priority

    You can configure priorities to specify primary and secondary origin servers. The primary origin server has a higher priority than the secondary origin server. Alibaba Cloud CDN preferably redirects requests to the primary origin server. If a fault occurs on the primary origin server, requests are redirected to the secondary origin server. The priority ranges from 0 to 127. A smaller value indicates a higher priority. By default, the priority of the primary origin server is 20, and the priority of the secondary origin server is 30. If you want to specify other values, submit a ticket.

    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 the weights of the origin servers. This way, loads are balanced 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 you want Alibaba Cloud CDN to redirect HTTPS requests to origin servers over custom ports, configure the origin protocol policy. For more information, see Configure the origin protocol policy.

    • If the Origin Protocol Policy feature is enabled, the port that is specified by this parameter becomes invalid. By default, the feature is disabled. For more information about how to disable the origin protocol policy feature, 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 you configure the preceding parameters, click OK.

  4. Optional: Repeat the preceding steps to add multiple 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.

    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

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

If two consecutive Layer 4 connection requests that are sent to the same origin IP address and port fail or time out, Alibaba Cloud CDN moves the IP address from the origin 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 two consecutive requests that are sent to an IP address still fail, a scheduled task is started. The task sends TCP probes to the IP address every 5 seconds. The IP address is added to the available origin address list only after a TCP connection to the IP address is established.

Note
  • Probes are sent to IP addresses. If a domain name is specified as the origin address, 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 you add a domain name to Alibaba Cloud CDN, Alibaba Cloud CDN assigns a CNAME to the domain name. You need to add a CNAME record for the domain name before Alibaba Cloud 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

Add domain names

Verify domain name ownership