Duoyun Cloud
Back to Blog
tutorials2026-04-16

Setting Up CDN on Tencent Cloud for Global Websites

Tencent CloudCDNGlobal AccelerationWebsite

Setting Up CDN on Tencent Cloud for Global Websites

Website loading speed directly impacts user experience and SEO rankings. Tencent Cloud CDN (Content Delivery Network) operates 2,800+ acceleration nodes across 70+ countries and regions, distributing your content to edge nodes closest to users for significantly reduced latency. This guide walks you through configuring Tencent Cloud CDN for global website acceleration.

How CDN Acceleration Works

CDN deploys edge server nodes worldwide, caching origin content at nodes closest to users. When a user visits your site, DNS intelligent resolution routes the request to the nearest CDN node, which responds directly — reducing origin fetches and transmission distance.

| Metric | Without CDN | With Tencent Cloud CDN | |--------|-------------|----------------------| | Global Avg Latency | 200-500ms | 30-80ms | | First Paint Time | 3-5 seconds | 0.8-2 seconds | | Origin Load | High | Low (70%-90% fewer origin fetches) | | DDoS Protection | Limited by origin bandwidth | Tbps-level protection |

Prerequisites

Before configuring CDN, ensure you have:

  • A registered domain (ICP filing required for China mainland acceleration) or international domain
  • An origin server (self-hosted or Tencent Cloud CVM)
  • DNS management access for your domain
  • SSL certificate (if HTTPS acceleration is needed)

Configuration Steps

Step 1: Add Your Domain

  1. Log in to the Tencent Cloud console and navigate to the CDN product page
  2. Click "Domain Management" → "Add Domain"
  3. Fill in domain details:

| Setting | Description | Recommended Value | |---------|-------------|-------------------| | Acceleration Domain | Domain to accelerate | cdn.example.com | | Service Type | Static/Download/Streaming | Static Web Acceleration | | Origin Type | Custom origin/COS/Third-party | Custom origin | | Origin Address | Origin IP or domain | 10.0.0.1:80 | | Origin Protocol | HTTP/HTTPS/Protocol follow | Protocol follow |

  1. Submit and the system will assign a CNAME address for your domain

Step 2: Configure DNS Resolution

At your DNS provider, create a CNAME record pointing to the Tencent Cloud-assigned CNAME:

cdn.example.com CNAME cdn.example.com.cdn.dnsv1.com

DNS propagation typically takes 10 minutes to 2 hours. Verify with:

dig cdn.example.com
# Confirm the result includes cdn.dnsv1.com

Step 3: Configure Cache Policies

Intelligent caching is the core of CDN performance optimization. Navigate to "Domain Management" → "Cache Configuration":

| File Type | Cache Duration | Rationale | |-----------|---------------|-----------| | .html | 3-10 minutes | Pages update frequently; avoid long cache | | .css, .js | 7-30 days | Static assets rarely change; long cache | | .jpg, .png, .gif | 30 days | Maximize image caching | | .mp4, .flv | 30 days | Long-term video caching | | /api/* | No cache | Dynamic API endpoints must not be cached |

Enable "Ignore Query String" to improve cache hit rates by filtering out non-essential URL parameters.

Step 4: Configure HTTPS

HTTPS is now standard for all websites. Tencent Cloud CDN offers free SSL certificates:

  1. Go to "Domain Management" → "HTTPS Configuration" and click "Configure Certificate"
  2. Select "Free Certificate" or upload your own
  3. Enable "Force HTTPS Redirect" to 301-redirect all HTTP requests to HTTPS
  4. Enable "HTTP/2.0" for multiplexing performance gains
  5. Set minimum TLS version to 1.2, disabling insecure 1.0 and 1.1

Step 5: Global Acceleration Optimization

For global user access scenarios, additional configuration is needed:

1. Enable Overseas Acceleration

In "Domain Management" → "Advanced Configuration":

  • Enable "Overseas Acceleration"
  • Choose "Global Acceleration" or "Overseas Only"

2. Intelligent Origin Fetch

| Origin Policy | Description | Use Case | |---------------|-------------|----------| | Nearest Origin | Fetch from closest origin | Multi-origin deployment | | Weighted Origin | Distribute requests by weight | Canary deployments | | Primary/Backup | Auto-failover to backup | High availability |

3. Dedicated Cross-Border Lines

Tencent Cloud CDN overseas nodes use dedicated lines to fetch from China mainland origins, avoiding public internet cross-border latency. This is enabled by default.

Step 6: Security Configuration

| Security Feature | Description | Recommended Setting | |-----------------|-------------|---------------------| | IP Rate Limiting | Limit requests per IP | 1,000 req/sec | | Hotlink Protection | Referer-based filtering | Whitelist mode | | IP Blacklist/Whitelist | Allow or block specific IPs | Per business needs | | URL Authentication | Prevent unauthorized access | Enable Type A auth |

Performance Monitoring and Tuning

Key Metrics

Monitor these metrics in the CDN console's "Data Analysis" page:

  • Hit Rate: Cache hit rate should stay above 90%; optimize cache policies if lower
  • Origin Fetch Rate: High origin rates increase origin server pressure
  • Status Code Distribution: Investigate 4xx/5xx anomalies promptly
  • Traffic Distribution: Understand user geography to optimize node coverage

Common Optimization Techniques

  1. Cache Prefetch: Proactively warm CDN nodes after content updates to avoid first-request origin fetches
  2. Cache Purge: Manually purge CDN cache for urgent content updates
  3. Range Origin Fetch: Enable partial-content fetches for large files to reduce origin bandwidth
  4. Smart Compression: Enable Gzip/Brotli compression to reduce transfer size

Pricing Overview

Tencent Cloud CDN bills by traffic or peak bandwidth:

| Billing Method | Best For | Reference Price (Mainland China) | |---------------|----------|----------------------------------| | By Traffic | Variable traffic | ¥0.20/GB (0-10TB tier) | | By Bandwidth Peak | Stable traffic | ¥0.54/Mbps/day | | Overseas Traffic | Global acceleration | ¥0.45/GB and up |

Prices are for reference only. Check Tencent Cloud official pricing for the latest rates. Volume discounts are available for higher monthly commitments.

Frequently Asked Questions

Why does traffic still reach the origin after CDN configuration?

Verify DNS resolution has propagated and the CNAME is correct. Some regions may have longer DNS cache TTLs.

How to achieve static/dynamic separation?

Deploy static assets to Tencent Cloud COS while routing dynamic requests directly to the origin. CDN only accelerates static content, reducing origin load.

Slow access for overseas users?

Confirm overseas acceleration is enabled. If your origin is in China, overseas nodes may experience higher origin fetch latency. Consider deploying an overseas origin or using Tencent Cloud Global Application Acceleration Platform (GAAP).

Conclusion

Tencent Cloud CDN, with its global network of 2,800+ nodes, can significantly improve the access experience for users worldwide. Through intelligent caching, HTTPS security, and proper access controls, you can ensure both performance and security.

As a Tencent Cloud partner, Duoyun Cloud offers exclusive CDN discounts and professional technical support. Whether you are a new CDN user or looking to optimize an existing setup, we help you achieve faster global acceleration at a lower cost. Contact us for a customized quote.

Need Professional Cloud Consulting?

Our cloud architect team will customize the best solution for you — free

Free Consultation

Related Posts

news

Edge Computing Trends Across Major Cloud Providers

2026-04-23
optimization

Cloud Billing Alerts and Budget Management Setup

2026-04-22
news

Tencent Cloud New AI Services Launch

2026-04-22