Tencent Cloud CDN Guide: Domain & Cache Rules
What Is Tencent Cloud CDN
Tencent Cloud CDN is a content delivery network made of high-performance acceleration nodes worldwide. Business content is stored at nearby nodes per cache policy, and requests are scheduled to the nearest node for fast response, reducing latency and improving availability. It solves three common problems: long physical distance between users and servers, cross-carrier forwarding, and origin bandwidth/load pressure. Serving mainland Chinese users is its core scenario; see also China website overseas CDN acceleration.
How It Works
Assume the acceleration domain is www.test.com:
- A user requests a resource under
www.test.com; the request goes to the local DNS first. - The local DNS finds the CNAME
www.test.com.cdn.dnsv1.comand hands the query to the Tencent GSLB scheduling system. - GSLB returns the best node IP based on user location, carrier, and node health.
- The user reaches that node: on a cache hit it returns directly; on a cache miss it fetches from the origin, caches per policy, and returns.
Step 1: Add an Acceleration Domain
- In the Tencent Cloud console, go to CDN → Domain Management → Add Domain.
- Enter the acceleration domain (ICP-registered), the business type (static acceleration, download, streaming, and so on), and the origin (origin IP, domain, or COS bucket), with origin protocol and port.
- The system returns a CNAME address.
Step 2: Configure the CNAME
At your DNS provider, add a CNAME record pointing the acceleration domain to the returned CNAME (such as xxx.cdn.dnsv1.com). Once propagation completes, acceleration begins. After that you can monitor node status and hit ratio in the console.
Step 3: Configure Cache Rules
Under Cache Config, set rules as needed:
- Cache expiration: set TTL by file type, directory, or full path; cache static assets long and set dynamic APIs to no-cache — see CDN cache strategy.
- Cache key and parameter filtering: whether to ignore query parameters directly affects hit ratio.
- Origin rules: set origin HOST, protocol, and timeout to protect origin bandwidth and stability.
Suggested TTLs by resource type (adjust to your business):
| Resource type | Example | Suggested TTL |
|---|---|---|
| Images/fonts | /images/*, *.woff2 |
30+ days |
| CSS/JS | /static/css/* |
7-30 days (with versioned names) |
| HTML pages | /, /about.html |
10 min - 1 hour |
| Dynamic APIs | /api/* |
No cache or 0 seconds |
| Temporary files | /tmp/* |
No cache |
Rules match from longest to shortest and specific to general. After configuring, verify in the purge/preheat area: preheat one URL, then compare origin logs to see whether it hit, and iterate a couple of times to stabilize the rules. For cache-key details see cache key strategy.
Step 4: Purge and Preheat
After origin updates, submit requests under purge & preheat:
- Purge URLs/directories: clear specific cache, for releases and corrections.
- Preheat URLs: push popular resources to nodes in advance, ideal before promotions and version releases.
- Again, use versioned URLs to reduce purge frequency and quota usage.
Step 5: Configure HTTPS and Security
- HTTPS config: enable and configure a certificate (free certificate or custom upload); force HTTPS for security — see SSL certificate guide 2026.
- Security: anti-leech, IP allow/deny lists, and URL authentication; advanced protection can combine WAF/EdgeOne — see CDN security protection features.
Pricing and When to Choose It
Tencent Cloud CDN offers pay-by-traffic and pay-by-bandwidth, plus overage packages and resource packs — details in CDN cost optimization guide. It suits mainland-focused, static-heavy websites, app updates, game packages, and audio/video delivery. For hybrid dynamic/static acceleration, pair it with Tencent Cloud EdgeOne; see dynamic content acceleration DCDN.
Billing Example and Common Issues
With pay-by-traffic, suppose monthly egress is 200 GB at roughly ¥0.2/GB — about ¥40/month in CDN cost. If peak bandwidth holds steady at 30 Mbps, pay-by-bandwidth may be cheaper. The real question is not unit price but how even your traffic is: choose traffic billing for spiky traffic, bandwidth billing for sustained full load. Sites with many domains and high request volume should also watch request-based charges, which climb noticeably during sales events — see the cost checklist in CDN cost optimization guide.
When troubleshooting, these causes are the most common:
- CNAME not resolving: usually a DNS cache or a typo; use
digto confirm the returned CNAME matches the Tencent console. - Low hit ratio: check whether dynamic APIs were mistakenly made cacheable, or query parameters are exploding the cache key — see cache key strategy and hit-ratio optimization.
- Origin timeout: insufficient origin bandwidth or a mismatched origin protocol; load-test the origin first, then raise the origin timeout.
- Anti-leech false positives: after enabling Referer anti-leech, some legitimate referrers get blocked — keep the allow list complete.
16IDC Take
Tencent Cloud CDN's strengths are synergy with the Tencent ecosystem (COS, EdgeOne, WeChat/mini-program scenarios) and mainland scheduling quality. For domestic sites it stands alongside Alibaba Cloud as a "hassle-free pick" — see the Alibaba Cloud CDN setup guide for a side-by-side comparison. If you also serve overseas users, evaluate overseas coverage or stack multiple CDNs. For overall selection see CDN provider selection guide. More content in the CDN acceleration category.
Reference: Tencent Cloud CDN documentation https://cloud.tencent.com/document/product/228; source https://cloud.tencent.com/document/product/228/2939