Alibaba Cloud CDN Guide: Domain Setup & Purge
What Is Alibaba Cloud CDN
Alibaba Cloud CDN is one of the most widely deployed CDN services in China, with 3,200+ nodes globally (2,300+ in Chinese mainland covering all 31 provinces, and 900+ overseas across 70+ countries and regions) and 180 Tbps total bandwidth. It caches origin resources at nearby edge nodes so users get content without hitting the origin, while sharply reducing origin load. If most of your users are in mainland China, it is often the best fit; see also China website overseas CDN acceleration.
To judge whether it suits you, ask three questions first: is most of your traffic static assets? Are your users concentrated in mainland China? Is the origin already stable? If all three answers are yes, the payoff is direct — in practice, a static image site can typically cut its nationwide first-screen time from 1.5+ seconds to under 300 ms after enabling CDN.
Step 1: Enable the Service and Add a Domain
- Enable CDN in the Alibaba Cloud console.
- Go to Domain Management → Add Domain:
- Acceleration domain: for example
cdn.example.com, ICP-registered (mainland) and verified for ownership. - Origin: choose OSS, ECS, SLB, or a custom origin IP/domain, and set the origin protocol (HTTP/HTTPS/follow) and port.
- Business type: image/small files, large file download, video on demand, and so on; this affects default cache policy.
- Acceleration domain: for example
- The system returns a CNAME (such as
cdn.example.com.w.cdngslb.com).
A common mistake is treating the "acceleration domain" and the "origin domain" as the same name. If your main site is example.com, it is usually better to use a subdomain like cdn.example.com as the acceleration entry and point the origin at www.example.com or an OSS bucket. That way, when you later switch CDN vendors or move origins, you only change one DNS record instead of touching the main site's resolution.
Step 2: Configure the CNAME
At your DNS provider, add a CNAME record pointing the acceleration domain to the returned CNAME. With a typical DNS panel this is one record:
| Record Type | Host | Value |
|---|---|---|
| CNAME | cdn | cdn.example.com.w.cdngslb.com |
The scheduling system then assigns the best node based on user location, carrier, and node health, supporting DNS, DoH, and 302 scheduling. CNAME propagation takes minutes; verify the status changes to "running normally."
If the status stays "not in effect" after configuration, the usual causes are: a missing trailing dot or an accidentally full domain in the CNAME value; another CDN vendor's CNAME overwriting yours; or DNSSEC on the domain breaking the scheduling resolution. Run dig cdn.example.com CNAME to check whether the answer points at Alibaba's scheduling domain, then work backward.
Step 3: Configure HTTPS and Certificates
- Enable HTTPS under Domain Management → HTTPS Config.
- Use the free certificate (auto-issued) or upload a custom certificate (with private key).
- Turn on HTTP/2 and force HTTPS redirect for security and performance. For certificate selection see SSL certificate guide 2026.
The free certificate is issued automatically and suits most personal and small-to-medium sites. If you need strict compliance or brand requirements (such as OV/EV certificates or wildcard multi-domain coverage), upload your own. Start renewing about 30 days before expiry so an expired certificate never triggers a wide access failure.
Step 4: Configure Caching and Origin
- Cache expiration: set TTL by file type, directory, or full path; cache static assets (images, CSS, JS) for 30+ days and set dynamic content to no-cache or very short TTL — see CDN cache strategy.
- Parameter filtering: ignoring query parameters raises hit ratio; keep them only when needed for dynamic parameters.
- Origin rules: set origin HOST, protocol, and timeout; the L1/L2 hierarchical cache architecture significantly reduces origin bandwidth.
A practical pattern is differentiated TTL by path: cache /static/* for 30 days, /uploads/* for 7 days, HTML pages for 10 minutes, and never cache login-related APIs. This keeps high hit ratios on static assets without letting content updates get "stuck" on edge nodes.
Step 5: Purge and Preheat
After origin updates, use the purge & preheat page:
- Purge: delete node cache (by URL or directory), for content changes.
- Preheat: push resources to nodes nationwide in advance, ideal before promotions or video releases; it sharply improves first-visit experience.
- Purges have daily quotas; use versioned URLs to reduce frequency.
For example, when a new image version goes live, instead of manually purging hundreds of URLs, add a version to the reference like logo-v2.png. The CDN caches the new URL as a fresh object, the old one expires naturally, and you save your daily purge quota.
A typical onboarding case
Take an e-commerce image site (200,000 daily pageviews, about 30 GB of images): before onboarding, origin peak bandwidth was consistently around 800 Mbps, with high origin costs and occasional saturation during promotions. The flow: enable CDN → add img.example.com as the acceleration domain pointing at an OSS origin → add a CNAME at DNS → enable free HTTPS and HTTP/2 → set 30-day and 7-day TTLs for /static/* and /uploads/*. Two weeks after launch, the node hit ratio held above 95%, origin peak bandwidth dropped below 40 Mbps, and one preheat before the promotion was enough.
Security and Pricing
- Security: referer anti-leech, URL authentication, and IP allow/deny lists; for advanced needs use WAF or DCDN full-site acceleration — see CDN security protection features.
- Billing: basic service supports pay-by-traffic and pay-by-bandwidth, plus value-added meters such as HTTPS/QUIC requests; details in CDN cost optimization guide.
- Dynamic content: if dynamic traffic is high, consider DCDN full-site acceleration — see dynamic content acceleration DCDN.
16IDC Take
Alibaba Cloud CDN's strengths are mainland node density and the integrated post-ICP experience: domain, OSS, ECS, and CDN work in one account, and intra-cloud origin traffic bills lower. For Chinese-market, static-heavy sites it is one of the most hassle-free options. If you also serve overseas users, add overseas nodes or a multi-CDN mix. For overall selection see CDN provider selection guide. More content in the CDN acceleration category.
Source: https://help.aliyun.com/zh/cdn/product-overview/what-is-alibaba-cloud-cdn
Reference: https://help.aliyun.com/zh/cdn/user-guide/add-a-domain-name (Add an acceleration domain)
Reference: https://help.aliyun.com/zh/cdn/user-guide/purge-and-preheat (Purge and preheat)