This topic describes how to configure Alibaba Cloud Content Delivery Network (CDN) in accelerated regions outside mainland China in the Alibaba Cloud CDN console. To accelerate content delivery in Hong Kong, Macao, Taiwan, and other regions outside mainland China, follow the procedure described in this topic to activate and configure Alibaba Cloud CDN.
- Large files: Your websites or applications offer downloads of files larger than 20 MB, such as game applications, client applications, and mobile apps.
- On-demand audio and video streaming: Your websites or applications offer on-demand video streaming or short video streaming. Mainstream media formats such as MP4 and FLV are supported.
If your workloads are deployed in one of the preceding scenarios, and the origin server is deployed in a region outside mainland China, perform the following steps to configure Alibaba Cloud CDN:
Step 1: Activate Alibaba Cloud CDN
Step 2: Add the domain name to be accelerated
- In the left-side navigation pane, click Domain Names.
- On the Domain Names page, click Add Domain Name.
- Set the following parameters: Domain Name to Accelerate, Resource Groups, Business Type, Port, and Region.Note To accelerate content delivery in Hong Kong, Macao, Taiwan, and other regions outside mainland China, select Global or Global (Excluding Mainland China). If you select Global as the accelerated region, the accelerated domain name must obtain an Internet Content Provider (ICP) number. We recommend that you apply for ICP numbers through Alibaba Cloud ICP Filing System.
Parameter Value Description Domain Name to Accelerate -Enter the domain name that you want to add to Alibaba Cloud CDN, for example, ch.aliyun.com. Note that:
- You can use a subdomain name or a wildcard domain name as the accelerated domain name,
- You cannot add a duplicate domain name to Alibaba Cloud CDN. If a DomainAlreadyExist error occurs, submit a ticket.
- You can add at most 50 domain names to Alibaba Cloud CDN under each Alibaba Cloud account. To add more domain names, submit a ticket.
- Content that is delivered from your domain name must comply with the limits of Alibaba Cloud CDN and the relevant regulations. For more information, see Limits.
Business Type Image and Small File If you want to accelerate the delivery of small-sized static content on your website, we recommend that you select Image and Small File from the Business Type drop-down list. Examples of small-sized static content include small-sized files, images, and style sheets. Delivery of large files If you want to accelerate the delivery of static files larger than 20 MB, we recommend that you select Large File Download from the Business Type drop-down list. Examples of large-sized static files include game installation packages, app update packages, mobile read-only memory (ROM) upgrade packages, and app packages. VOD If you want to accelerate the delivery of on-demand video or audio content, we recommend that you select VOD from the Business Type drop-down list. Origin Info IP You can enter the public IP addresses of one or more servers. IP addresses of Alibaba Cloud Elastic Compute Service (ECS) instances do not need to be reviewed. Site Domain You can enter the domain names of one or more origin servers.Note The domain name of the origin server that you specified cannot be the same as the accelerated domain name. Otherwise, a DNS resolution loop occurs and requests cannot be redirected to the origin server correctly. For example, if the domain name of your origin server is img.yourdomain.com, you can set the accelerated domain name to cdn.yourdomain.com. OSS Domain You can enter the public endpoint of an Alibaba Cloud Object Storage Service (OSS) bucket, for example, xxx.oss-cn-hangzhou.aliyuncs.com. To view the public endpoint of an OSS bucket, go to the OSS console. You can also select the endpoint of an OSS bucket under the current Alibaba Cloud account from the Domain Name drop-down list. Function Compute Domain If you select this value, you must set the Region and Domain Name parameters. Port -Select a port based on your business requirements.
- Port 80
Data is transmitted over HTTP.
- Port 443
Data is transmitted over HTTPS.
Region Global (Excluding Mainland China) If you select Global (Excluding Mainland China), you do not need to obtain an ICP number for the domain name. Global If you select Global, you must obtain an ICP number for the domain name. For more information, see Apply for an Internet Content Provider (ICP) number for an accelerated domain name. Mainland China Only If you select Mainland China Only, you must obtain an ICP number for the domain name. For more information, see Apply for an Internet Content Provider (ICP) number for an accelerated domain name.
- You can use a subdomain name or a wildcard domain name as the accelerated domain name, for example,
- Click Next.
Step 3: Configure a CNAME record
After you add a domain name to Alibaba Cloud CDN, Alibaba Cloud CDN verifies the ownership of the domain name. After the domain name passes the ownership verification, Alibaba Cloud CDN assigns a Canonical Name (CNAME) to the domain name. To enable CDN acceleration for the domain name, you must add a CNAME record to map the domain name to the CNAME. This way, requests sent to the domain name can be redirected to CDN nodes. The following example demonstrates how to add a CANME record for the domain name. Alibaba Cloud DNS (previously known as HiChina) is used in the example.
- Obtain the CNAME assigned to the domain name.
- In the left-side navigation pane, click Domain Names.
- On the Domain Names page, copy the CNAME of the accelerated domain name.
- Add a CNAME record.
- Log on to the Alibaba Cloud DNS console.
- On the Manage DNS page, click the Domains tab, select the domain name that you want to manage, and then click Configure in the Actions column.
- Click Add Record and add a CNAME record.
- Click OK.
The CNAME record is added. CDN acceleration is automatically enabled for the domain name immediately after the CNAME record takes effect. After you add a CNAME record, it immediately takes effect. After you modify a CNAME record, the modifications take effect within 72 hours.
- Check whether the CNAME record has taken effect.
- Open the Command Prompt in Windows.
- Enter ping or dig and the accelerated domain name into the Command Prompt.If the output includes
*.*kunlun*.com, both the CNAME record and CDN acceleration have taken effect.