Alibaba Cloud CDN and DNS Tutorial: Acceleration Setup, DDoS Protection Complete Guide
Website loading too slow, users leave before it finishes. Worse, once hit by a DDoS attack, the website goes down completely. These problems can be solved through proper CDN and DNS configuration.
Alibaba Cloud has unique advantages in network acceleration and security protection, especially in the China market. This article details Alibaba Cloud's DNS services, CDN acceleration configuration, and DDoS protection features to help you build a fast and secure website.
Want to learn more about Alibaba Cloud services? See Alibaba Cloud Complete Guide.
Alibaba Cloud DNS Services Introduction
Alibaba Cloud DNS is a domain name resolution service that converts domain names to IP addresses.
Core DNS Features
Alibaba Cloud DNS isn't just simple domain resolution—it offers multiple advanced features:
Smart Resolution (GeoDNS)
This is one of Alibaba Cloud DNS's most practical features. The system automatically returns the optimal IP address based on the user's geographic location.
For example, you can set up:
- China users → Resolve to Alibaba Cloud China data center
- Taiwan users → Resolve to Hong Kong data center
- EU/US users → Resolve to Singapore or US data center
This way users from each region connect to the nearest server, significantly reducing latency.
Multi-line Resolution
For China's complex network environment, Alibaba Cloud DNS supports multi-line resolution:
- China Telecom users → Telecom IP
- China Unicom users → Unicom IP
- China Mobile users → Mobile IP
This is particularly important within China because interconnection speed between different carriers is slower.
High Availability Architecture
Alibaba Cloud DNS paid editions provide a 100% monthly availability SLA (the free edition has no availability guarantee), with a distributed architecture:
- Multiple global DNS nodes
- Automatic failover
- Millisecond-level resolution response
DNS Service Version Comparison
Alibaba Cloud DNS offers free and multiple paid versions:
| Feature | Free | Personal | Enterprise Ultimate | Exclusive |
|---|---|---|---|---|
| Intended for | Testing | Individual developers only | Enterprises | Enterprises |
| Availability SLA | None | 100% monthly | 100% monthly | 100% monthly |
| Query limit | 100,000 per day per domain | Unlimited | Unlimited | Unlimited |
| Minimum TTL | 600s | 600s | 1s | 1s |
Alibaba Cloud states the free edition is only for testing and development and recommends a paid edition for production; enterprise workloads can choose Enterprise Ultimate for smart resolution lines, a 100% SLA, and a 1-second TTL.
Alibaba Cloud CDN Acceleration Service
CDN (Content Delivery Network) works on a simple principle: cache your website content on nodes around the world, so users get content from the nearest node instead of connecting back to your origin server every time.
Alibaba Cloud CDN Advantages
Alibaba Cloud CDN has unique advantages in the China market:
Node Coverage
Alibaba Cloud CDN has 3,200+ nodes worldwide, with over 180 Tbps of total egress bandwidth. Of these, 2,300+ nodes are in mainland China, covering 31 provincial-level regions; 900+ nodes are overseas and in Hong Kong and Macao, covering more than 70 countries and regions.
If your users are mainly in China, coverage inside mainland China is Alibaba Cloud CDN's strong suit.
Protocol Support
- HTTP/2: Reduces connections, improves performance
- QUIC: Reduces latency, improves weak network experience
- WebSocket: Supports real-time communication applications
Use Cases
Alibaba Cloud CDN is suitable for:
| Scenario | Description | Effect |
|---|---|---|
| Website acceleration | Static resource caching (images, CSS, JS) | Shorter page load times |
| Large file download | Software, game update package distribution | Stable high-speed download |
| Video streaming | Live and on-demand content distribution | Smooth playback, less buffering |
| Dynamic acceleration (DCDN) | API requests, dynamic page acceleration | Origin path optimization |
CDN and Origin Server Relationship
Many people ask: Do I still need my own server with CDN?
Yes, you do. CDN is just a caching layer—you still need an origin server to store original content. CDN nodes pull content from the origin server, cache it, and serve it to users.
Common origin configurations:
- Alibaba Cloud ECS: If you already use Alibaba Cloud servers, CDN integration is easiest. See Alibaba Cloud ECS Tutorial
- Alibaba Cloud OSS: Best choice for static websites or pure file distribution. See Alibaba Cloud OSS Complete Tutorial
- Own servers: Any server accessible via public internet works
DDoS Protection Features
Website security is another important topic. DDoS (Distributed Denial of Service) attacks are one of the most common network attacks, overwhelming your website with massive traffic.
Alibaba Cloud DDoS Protection Plans
Alibaba Cloud offers multi-tier DDoS protection:
Basic DDoS Protection (Free)
All Alibaba Cloud users automatically get basic protection:
- Protection capability: Depends on the instance specification and region (thresholds are calculated automatically)
- Coverage: ECS, SLB, EIP, etc.
- No additional configuration needed
For small websites, this free quota is usually sufficient.
DDoS High Protection IP
When attack traffic exceeds basic protection capability, you need High Protection IP:
| Plan | Protection Capability | Use Case | Reference Monthly Fee |
|---|---|---|---|
| Anti-DDoS Pro (Chinese mainland), entry spec | 30 Gbps guaranteed | General enterprise websites | ¥20,800 |
| Anti-DDoS Pro, mid spec | 100 Gbps guaranteed | Finance, gaming | ¥76,800 |
| Anti-DDoS Pro, high spec | 300 Gbps guaranteed | Large platforms | ¥96,800 |
| Anti-DDoS Pro, higher specs | 400-1,500 Gbps guaranteed | Very large platforms | From ¥150,000 |
Web Application Firewall (WAF)
DDoS protection blocks traffic attacks; WAF protects against application layer attacks:
- SQL injection
- XSS cross-site scripting
- CSRF cross-site request forgery
- Malicious crawlers
WAF and DDoS High Protection can be used together for complete security protection.
DDoS Protection Selection Recommendations
How to choose the right protection plan?
- Small websites: Use free basic protection
- E-commerce websites: At least configure WAF, temporarily upgrade to High Protection during important periods (like Singles' Day)
- Finance/Gaming: These industries are high-attack targets—go directly to High Protection IP
- Uncertain needs: Start with basic, upgrade in real-time when attacked
Worried about website attacks? DDoS attack costs far exceed protection costs. Schedule Security Assessment, let us help you review potential risks.
DNS Setup Tutorial
Now let's get into practice. Starting with DNS setup.
Step 1: Add Domain
- Log into Alibaba Cloud console
- Search for "Cloud DNS" to enter the service
- Click "Add Domain"
- Enter your domain (e.g., example.com)
Step 2: Modify NS Records
After adding the domain, Alibaba Cloud provides NS (Name Server) records. You need to modify NS settings at your domain registrar.
Common registrar NS modification locations:
- GoDaddy: Domain Settings → Nameservers
- Namecheap: Domain List → DNS
- Squarespace Domains (formerly Google Domains, which finished migrating on 2024-07-10 and no longer exists): Domains → DNS → Nameservers
Use the NS records shown in your Alibaba Cloud console; common formats look like this:
# Common on the free edition
dns29.hichina.com
dns30.hichina.com
# Paid editions (Personal, Enterprise Ultimate, etc.) usually get vip1-vip8.alidns.com
vip1.alidns.com
vip2.alidns.com
After modification, wait 24-48 hours to take effect (usually just a few hours).
Step 3: Add Resolution Records
After NS records take effect, you can start adding resolution records.
Common Record Types:
| Record Type | Purpose | Example Value |
|---|---|---|
| A | Domain points to IPv4 address | 1.2.3.4 |
| AAAA | Domain points to IPv6 address | 2001:db8::1 |
| CNAME | Domain points to another domain | cdn.example.com |
| MX | Mail server | mail.example.com |
| TXT | Text record (for verification) | v=spf1 include:... |
Configuration Example:
Assuming your website IP is 47.52.1.1:
Host Record: @
Record Type: A
Record Value: 47.52.1.1
TTL: 600
This makes example.com point to your server.
To set up www.example.com:
Host Record: www
Record Type: A
Record Value: 47.52.1.1
TTL: 600
Step 4: Configure Smart Resolution (Optional)
If you have multiple servers in different regions, enable smart resolution:
- On the resolution records page, click "Add Record"
- Select "Resolution Line"
- Set different IPs for different lines
For example:
- Default line → Hong Kong server IP
- China Telecom → China Telecom IP
- China Unicom → China Unicom IP
CDN Setup Tutorial
After DNS setup, configure CDN next.
Step 1: Add Acceleration Domain
- Log into Alibaba Cloud console, enter "CDN" service
- Click "Domain Management" → "Add Domain"
- Enter acceleration domain (e.g., cdn.example.com or www.example.com)
Business Type Selection:
- Small files/images: Suitable for general websites
- Large file download: Suitable for software download sites
- Video streaming: Suitable for video websites
- Full-site acceleration: Accelerate both static and dynamic content
Step 2: Configure Origin Server
The origin server is your original server. Three configuration methods:
Method 1: IP Address
Origin Type: IP
Origin Address: 47.52.1.1
Port: 80 (HTTP) or 443 (HTTPS)
Method 2: Domain
Origin Type: Origin Domain
Origin Address: origin.example.com
Port: 80 or 443
Method 3: OSS Domain
Origin Type: OSS Domain
Bucket: your-bucket.oss-cn-hongkong.aliyuncs.com
Step 3: Configure CNAME
After adding the domain, Alibaba Cloud provides a CNAME record in a format like:
cdn.example.com.w.kunlunsl.com
You need to point the acceleration domain to this CNAME in DNS settings:
Host Record: cdn (or www)
Record Type: CNAME
Record Value: cdn.example.com.w.kunlunsl.com
TTL: 600
Step 4: Configure HTTPS (Highly Recommended)
All websites today should use HTTPS. In the CDN console:
- Go to Domain Management → Select your domain
- Click "HTTPS Configuration"
- Enable HTTPS
- Upload SSL certificate, or use Alibaba Cloud free certificate
HTTPS Configuration Options:
- Force HTTPS: Recommended to enable, automatically redirect HTTP requests to HTTPS
- HSTS: Enhanced security, tells browsers to only use HTTPS
- HTTP/2: Recommended to enable, improves transfer efficiency
Step 5: Cache Strategy Configuration
CDN effectiveness depends on cache strategy settings. Go to "Cache Configuration":
Recommended Cache Times:
| File Type | Recommended Cache Time | Notes |
|---|---|---|
| Images (.jpg, .png, .gif) | 30 days | Images rarely change |
| CSS, JS | 7 days | Version control via filename |
| HTML | 1 hour or no cache | Needs real-time updates |
| API responses | No cache | Dynamic content |
Cache Key Settings:
Recommend enabling "Ignore URL Parameters" so image.jpg?v=1 and image.jpg?v=2 are treated as the same file. But if you use parameters for version control, keep parameters.
CDN configuration looks simple, but has many details. Wrong settings can make your website slower or generate high fees. Schedule CDN Assessment, let experts review your configuration.
Pricing Comparison
After understanding features and setup, let's look at pricing.
DNS Service Pricing
| Service Version | Annual Fee | Use Case |
|---|---|---|
| Free | Free | Testing and development |
| Personal | ¥48/domain/year (DNS security protection optional) | Individual developers only |
| Enterprise Ultimate | ¥568/domain/year + mandatory DNS security protection (basic protection ¥600/year, ¥1,168/year in total) | Enterprises |
| Exclusive | ¥30,000/domain/year (includes full DNS protection) | Large enterprises, critical business |
CDN Pricing
Alibaba Cloud CDN has two billing methods:
Pay-by-Traffic
| Region | Unit Price |
|---|---|
| Mainland China | ¥0.24/GB |
| North America, Europe | ¥0.46/GB |
| Asia Pacific 1 (Hong Kong, Taiwan, Japan, Singapore, etc.) | ¥0.58/GB |
| Asia Pacific 2 (South Korea, India, etc.) | ¥0.78/GB |
(These are list prices for the 0-10 TB monthly traffic tier; unit prices drop at higher volumes. Taiwan is in Asia Pacific 1.)
Pay-by-Daily-Bandwidth-Peak (requires a peak above 5 Gbps within the last 30 days, enabled through your Alibaba Cloud account manager)
| Daily Peak Bandwidth | Mainland China Unit Price |
|---|---|
| 0-500 Mbps | ¥0.6/Mbps/day |
| 500 Mbps-5 Gbps | ¥0.58/Mbps/day |
| 5-20 Gbps | ¥0.56/Mbps/day |
How to Choose Billing Method?
- High traffic fluctuation, occasional peaks → Pay-by-traffic
- Stable traffic, continuous high traffic → Pay-by-bandwidth
Generally, small to medium websites should choose pay-by-traffic for easier cost control.
DDoS Protection Pricing
| Service | Cost | Notes |
|---|---|---|
| Basic Protection | Free | Ceiling depends on instance spec and region |
| Anti-DDoS Pro (30G guaranteed) | ¥20,800+/month | Includes default specs such as 100 Mbps service bandwidth |
| WAF 3.0 | ¥980+/month (Basic edition, subscription) | Application layer protection |
Money-Saving Tips:
- Use CDN for traffic offloading: CDN itself has some attack buffering capability
- Buy on demand: Use free version normally, upgrade in real-time when attacked
- Compare subscription and pay-as-you-go: Pick the model that fits your usage; check the purchase page for the actual price difference
Cost Calculation Example
Assume a medium e-commerce website:
- Daily average traffic: 100 GB
- Main users: China 80%, Taiwan 20%
- Need basic security protection
Monthly Cost Calculation:
| Item | Calculation | Cost |
|---|---|---|
| DNS (Enterprise Ultimate + basic protection) | ¥1,168 ÷ 12 | ≈¥97/month |
| CDN (Mainland China) | 100GB × 30 × 0.8 × ¥0.24 | ¥576/month |
| CDN (Taiwan, Asia Pacific 1) | 100GB × 30 × 0.2 × ¥0.58 | ¥348/month |
| DDoS Basic Protection | Free | ¥0 |
| Total | ≈¥1,021/month |
Actual costs vary based on traffic distribution and usage patterns.
FAQ
CDN setup but website is actually slower?
Possible causes:
- Cache not hitting: Check cache configuration, ensure static resources are correctly cached
- Origin too far: Ensure origin is in appropriate region
- HTTPS not configured properly: Ensure both CDN and origin support HTTPS
How long does DNS modification take to take effect?
Theoretically, after TTL time expires. But due to various DNS caches, usually:
- New records: Minutes to hours
- Modified records: Old TTL time (possibly 24-48 hours)
Recommend lowering TTL before making changes.
What's the difference between CDN and VPN?
Completely different things:
- CDN: Accelerates website content delivery, transparent to users
- VPN: Network proxy tool, changes user's network exit
Using CDN requires no user configuration.
Does China CDN require ICP filing?
Yes. To use Alibaba Cloud's mainland China CDN nodes, your domain must complete ICP filing.
Hong Kong, Taiwan, and other region nodes don't require filing.
What to do when hit by DDoS attack?
- Confirm attack: Check cloud monitoring, confirm if it's really an attack
- Enable High Protection: If exceeding basic protection, immediately purchase High Protection IP
- Contact support: Alibaba Cloud has 24/7 security emergency service
- Analyze source: After attack ends, analyze logs and strengthen protection strategies
How to know if CDN is working?
Several methods:
- Check HTTP Headers: Correctly configured will show
X-Cache: HIT - Use speed test tools: Compare loading times with and without CDN
- Check console: Alibaba Cloud console has hit rate statistics
Website Too Slow? CDN May Be the Answer
Website speed directly affects user experience and SEO ranking.
CDN choice affects performance and cost—choosing wrong makes it more expensive.
Schedule CDN Assessment, let us help you:
- Analyze current performance bottlenecks
- Recommend the most suitable CDN solution
- Plan DDoS protection strategy
Related Articles
- Alibaba Cloud Complete Guide - Alibaba Cloud services overview
- Alibaba Cloud ECS Tutorial - CDN can accelerate ECS websites
- Alibaba Cloud OSS Complete Tutorial - OSS is often used with CDN
- Alibaba Cloud Enterprise Email Tutorial - MX and SPF record configuration
- Alibaba Cloud International Guide - Registration guide for Taiwan users
Need Professional Cloud Advice?
Whether you're evaluating cloud platforms, optimizing existing architecture, or looking for cost-saving solutions, we can help
Book Free ConsultationRelated Articles
Alibaba Cloud International Complete Guide: Registration, Services, and Pricing for International Users [2026]
What's the difference between Alibaba Cloud International and China site? This article details how international users can register on the International site, payment method setup, main services introduction, pricing and discounts, plus a complete comparison with the China site to help you make the right choice.
Alibaba CloudAlibaba Cloud Complete Guide: From Beginner to Advanced, Essential Reading for International Users [2026]
What is Alibaba Cloud? Complete analysis of Alibaba Cloud International vs China site differences, registration tutorial, core services (ECS, OSS, CDN), cost estimation, and comparison with AWS and GCP. Your comprehensive guide to Asia Pacific's largest cloud platform.
Alibaba CloudAlibaba Cloud AI Services: Tongyi LLM, Bailian Platform, DeepSeek Integration Guide
What AI services does Alibaba Cloud offer? This article introduces the Tongyi (Qwen) large language models, Bailian platform, Model Gallery, and DeepSeek integration, with comparisons to AWS Bedrock and GCP Vertex AI.