Overview

Alibaba Cloud cdn has the highest market share in China and the widest node coverage. If your website mainly targets Chinese users and your domain has completed ICP filing, Alibaba Cloud CDN is a relatively reliable choice.

This article introduces how to configure Alibaba Cloud CDN from scratch and how the costs are calculated.

I. Activate CDN Service

Log in to the Alibaba Cloud official website, search for "CDN," and click "Buy Now." There is a free quota for first-time use, and new users usually receive a 20GB traffic package. After activation, enter the console.

II. Add an Accelerated Domain

In the CDN console, click "Add Domain."

Accelerated Domain: Enter the website domain you want to accelerate, such as bbs.baike300.com. Note that you should not enter the main domain; it is recommended to use a subdomain.

Business Type: For small websites, choose "Images and Small Files"; for large file downloads, choose "Large File Download"; for video websites, choose "Audio/Video on Demand."

Origin Information: Enter your server's IP or domain. If it is an Alibaba Cloud server, choose "OSS Domain" or "IP Address."

Ports: Check both 80 and 443 (if you use HTTPS).

III. Configure CNAME

After adding the domain, Alibaba Cloud will give you a CNAME address. Go to your domain DNS management backend (Alibaba Cloud Wanwang, Cloudflare, etc.), add a CNAME record, and point the accelerated domain to this CNAME address.

After configuration, wait 10–30 minutes for it to take effect.

IV. Configure HTTPS

If your website uses HTTPS, you need to upload an SSL certificate in the CDN console. Alibaba Cloud also provides free certificates, which can be applied for in "Certificate Management."

After successful upload or application, enable "HTTPS Acceleration" in the domain configuration and check "Force Redirect" (HTTP automatically redirects to HTTPS).

V. Pricing Explanation

Alibaba Cloud CDN uses tiered traffic billing. The larger the usage, the lower the unit price.

  • 0–10TB: 0.24 CNY/GB
  • 10–50TB: 0.20 CNY/GB
  • 50–100TB: 0.18 CNY/GB

HTTPS request fee: 0.05 CNY per 10,000 requests. For small websites, this cost is not high.

New users usually have a 20GB free traffic package, and billing only starts after it is used up.

VI. Cache Configuration Recommendations

In "Cache Configuration," you can set the cache time for static files (images, CSS, JS). It is recommended to cache images for 30 days and CSS/JS for 7 days. HTML files should not be cached or should be cached for a short time to avoid delayed content updates.

If the website is not updated frequently, you can appropriately extend the cache time to reduce back-to-origin requests and save on traffic costs.

Alibaba Cloud CDN Official Link: https://www.aliyun.com/product/cdn