Add a domain name

Updated at:

If you want to use Alibaba Cloud CDN to accelerate content delivery for a specific website, you need to configure the server that hosts the website as an origin server and configure an accelerated domain name for the website. CDN uses the accelerated domain name to cache content from the origin server to points of presence (POPs) that are distributed around the world. This significantly reduces the latency for content delivery and speeds up access.

Prerequisites

  1. An origin server that provides stable performance is deployed. If you do not have an origin server, follow the instructions in Create and manage an ECS instance in the console (express version) or Create a bucket to create one.

  2. A domain name to be accelerated is prepared.

    Note

    If the acceleration region is Chinese Mainland Only or Global, you need to apply for Internet Content Provider (ICP) filing 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.

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

Step 1: Configure business information

  1. Log on to the CDN console.

  2. In the left-side navigation pane, click Domain Names.

  3. Click Add Domain Name. In the Specify Domain Name Information step, configure the Region, Domain Name to Accelerate, and Business Type parameters. Keep the default settings for other parameters.

    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): Requests from outside the Chinese mainland are redirected to the nearest POPs. Requests from the Chinese mainland are redirected to POPs that are deployed in Japan, Singapore, or Hong Kong (China).

    Important
    • If you set the Region parameter to Chinese Mainland Only or Global, you must apply for an ICP number for the domain name. We recommend that you apply for ICP numbers by using the Alibaba Cloud ICP Filing System. The Ministry of Industry and Information Technology (MIIT) may not immediately synchronize the filing results after an application is approved. We recommend that you configure the domain name 8 hours after you obtain the ICP filing.

    • If you select Global (Excluding the Chinese Mainland), no ICP filing is required for the domain name.

    • The pricing varies based on the acceleration region. Select an acceleration region based on your business requirements. For more information about the pricing of CDN, visit the CDN pricing.

    Domain Name to Accelerate

    Specify the domain name to accelerate. For more information, see Limits.

    Note

    The first time you add a domain name to CDN, you must prove the ownership of the domain name. For more information, see Verify domain name ownership. If the root domain name has already passed ownership verification, skip this operation.

    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 static and dynamic content. Dynamic Content Delivery Network (DCDN) can accelerate the delivery of large amounts of dynamic content.

      If you set the Business Type parameter to ESA, follow the instructions to go to the DCDN console to add and configure the domain name. For more information, see Add a service 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 the business information for the domain name, click Add Origin Server in the Origin Servers section.

  2. In the Add Origin Server dialog box, select the type of the origin and enter the origin address. Keep the default settings for other parameters.

    Parameter

    Description

    Origin Info

    Select the type of the origin server and enter the address of the origin server. You can select OSS Domain, IP, Site Domain, or Function Compute Domain. OSS Domain is used as an example. For more information about other types of origin servers, see Configure an origin.

    Set the Origin Info parameter to OSS Domain and select an OSS bucket in the current account from the Domain Name drop-down list. You can also enter the public domain name of an OSS bucket. The internal domain name of an OSS bucket is not supported. Example: ***.oss-cn-hangzhou.aliyuncs.com.

    Priority

    You can configure primary and secondary origins. When a user request triggers an origin fetch, Alibaba Cloud CDN first tries the primary origin. If the primary origin fails (TCP connection between CDN node and origin fails), it falls back to the secondary origin. Priority values range from 0 to 127. The lower the number, the higher the priority. The default priority for a primary origin is 20; for a secondary origin, it is 30. To configure a priority value other than the defaults, submit a ticket.

    For example, if you have two origins, A and B, with origin A set as primary and origin B as backup, user requests that perform an origin fetch through Alibaba Cloud CDN will be directed to origin A first. If origin A fails (the TCP connection between the CDN node and the origin fails), the request will be redirected to origin B. When origin A recovers, traffic will switch back from origin B to origin A.

    Weight

    When multiple origins share the same priority, Alibaba Cloud CDN distributes user requests across origins proportionally based on their weights, enabling weighted load balancing. Set weights according to your business needs.

    • Range: 1–100. Higher values mean a larger share of requests.

    • Default value: 10.

    Example: Origins A and B both have primary priority. A has weight 80; B has weight 20. Requests are distributed in an 8:2 ratio between A and B.

    Port

    This is the port that CDN uses to request resources from your origin. The default is 80. You can customize the port based on your origin’s support. Valid ports range from 1 to 65535.

    • Default value: 80.

    • If you set the port to 443, origin fetch uses HTTPS. For port 80 or any other custom port, origin fetch uses HTTP.

    Note
    • To use HTTPS on a custom port other than 443, see Configure origin protocol policy.

    • If you enable the Origin Protocol Policy feature (disabled by default), the port setting here is ignored. To disable origin protocol policy, see Configure origin protocol policy.

    • When using an OSS domain as your origin, whether custom ports are supported depends on OSS.

  3. After you complete the preceding configurations, click OK.

Step 3: Complete ownership verification

  1. After you add an origin server, read and select the compliance commitment, and click Next.

  2. In the Recommended Features step, configure features such as Cache Expiration, Ignore Parameters, HTML Optimization, Range Origin Fetch, and Gzip Compression based on your business requirements. These features improve the cache hit ratio and performance of CDN. For more information, see (Optional) Configure system-recommended features.

    You can click Configure in the lower part of the page. CDN completes relevant configurations. You can also click Back to Domain Management, find the domain name that you want to manage, and then click Recommended Features in the Actions column.

  3. Wait for manual verification.

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

    Note
    • If the domain name does not need to be manually verified, proceed to the next step. In the next step, you can configure the parameters based on your business requirements.

    • Generally, a domain name is added to CDN within 10 minutes. In rare occasions, the process may require 30 minutes to complete. If a domain name fails to be added to CDN within 30 minutes, Alibaba Cloud engineers will troubleshoot and resolve the issue.

What to do next

Add a CNAME record for a domain name: After you add a domain name to CDN, CDN assigns a CNAME to the domain name. You need to add the 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: