All Products
Search
Document Center

CDN:Add a domain name

Last Updated:Jul 16, 2024

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. Alibaba Cloud 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. 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. 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.

    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): 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 Alibaba Cloud CDN, visit the CDN pricing page.

    Global Resource Plan

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

    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 Alibaba Cloud CDN, you must prove the ownership of the domain name. For more information, see Verify the ownership of a domain name. 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 DCDN, 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 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 server.

    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 priorities to specify primary and secondary origin servers. The primary origin server has a higher priority than the secondary origin server. Alibaba Cloud CDN preferentially 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 specify Origin Server A as the primary origin server and Origin Server B as the secondary origin server. In this case, Alibaba Cloud CDN preferentially 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 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 the weight 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 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 Alibaba Cloud CDN. For more information, see (Optional) Configure system-recommended features.

    You can click Configure in the lower part of the page. Alibaba Cloud 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.

    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.

    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.

    image

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 the 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: