Add a domain name

更新时间:
复制 MD 格式

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.

    china

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

    Configure origin server information

    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

    The priority setting determines which origin servers are primary and which are secondary. Primary origin servers have a higher priority than secondary ones. When Alibaba Cloud CDN performs an origin fetch, it first attempts to connect to a primary origin server. If a primary origin server fails (for example, if a TCP connection cannot be established), requests are automatically routed to a secondary origin server. The valid range for priority is 0 to 127, where a smaller value indicates a higher priority. The default priority for a primary origin is 20, and for a secondary origin is 30. To configure other values, you must submit a ticket.

    For example, if you have two origin servers, A and B, where A is the primary and B is the secondary, Alibaba Cloud CDN will first route origin fetch requests to server A. If server A fails (for example, the TCP connection fails), requests will be routed to server B. When server A becomes available again, traffic will fail back from B to A.

    Weight

    When multiple origin servers have the same priority, Alibaba Cloud CDN distributes origin fetch requests among them based on their assigned weight, enabling weighted load balancing. You can set the weight for each origin server based on its capacity.

    • Valid values: 1 to 100. A higher value means the origin server receives a larger proportion of requests.

    • Default value: 10.

    For example, if you have two origin servers, A and B, both with primary priority, and you set the weight of A to 80 and B to 20, requests will be distributed between them at an 8:2 ratio.

    Port

    Specifies the port on the origin server for CDN origin fetch requests. The default port is 80. You can specify a custom port from 1 to 65535, depending on your origin server's configuration.

    • Default value: 80.

    • If you set the port to 443, origin fetch uses HTTPS. If you set it to 80 or another custom port, origin fetch uses HTTP.

    Note
    • To use HTTPS for origin fetch with a custom port other than 443, you must configure an origin protocol policy. For more information, see Configure an origin protocol policy.

    • If you enable the Origin Protocol Policy feature (which is disabled by default), the port configured here is ignored. For information about how to disable this feature, see Configure an origin protocol policy.

    • If your origin server is an OSS domain, support for custom ports depends on the Object Storage Service product.

  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.

    image

    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: