Alibaba Cloud CDN and DNS Tutorial: Acceleration Setup, DDoS Protection Complete Guide
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 provides 100% SLA guarantee with 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 Standard | Enterprise Premium |
|---|---|---|---|---|
| Subdomain count | 10 | 30 | 100 | Unlimited |
| Smart resolution lines | 2 | 10 | 20 | Unlimited |
| Minimum TTL | 600s | 120s | 60s | 1s |
| URL forwarding | ❌ | ✅ | ✅ | ✅ |
| Search engine resolution | ❌ | ✅ | ✅ | ✅ |
| DDoS protection | Basic | Enhanced | Advanced | Premium |
For general websites, the free version is sufficient. Enterprise applications should choose Enterprise Standard or higher for more granular line control and faster TTL updates.
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 2,800+ global nodes, including:
- China domestic nodes: 2,300+
- Overseas nodes: 500+
This node density within China is unmatched by other cloud providers. If your users are mainly in China, Alibaba Cloud CDN is the best choice.
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) | 50-80% faster page loading |
| 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: Attacks under 5 Gbps
- 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 |
|---|---|---|---|
| High Protection IP (Standard) | 30-100 Gbps | General enterprise websites | ¥10,000+ |
| High Protection IP (Enhanced) | 100-300 Gbps | Finance, gaming | ¥30,000+ |
| High Protection IP (Ultra) | 300 Gbps-1 Tbps | Large platforms | Custom quote |
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
- Google Domains: DNS → Custom nameservers
Alibaba Cloud's NS records are usually:
dns1.hichina.com
dns2.hichina.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 | $0 | Personal websites, small projects |
| Personal | ¥99/year | Individual webmasters, small businesses |
| Enterprise Standard | ¥1,188/year | Medium enterprises |
| Enterprise Premium | ¥11,880/year | Large enterprises, critical business |
CDN Pricing
Alibaba Cloud CDN has two billing methods:
Pay-by-Traffic
| Region | Unit Price |
|---|---|
| Mainland China | ¥0.24/GB |
| Hong Kong/Taiwan/Japan/Korea | ¥0.75/GB |
| EU/US | ¥0.49/GB |
Pay-by-Bandwidth Peak
| Bandwidth | Mainland China Monthly Fee |
|---|---|
| 1-10 Mbps | ¥30/Mbps/month |
| 10-100 Mbps | ¥25/Mbps/month |
| 100-500 Mbps | ¥22/Mbps/month |
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 | Under 5 Gbps |
| High Protection IP (30G) | ¥10,400+/month | Includes basic bandwidth |
| WAF | ¥1,768+/month | 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
- Annual discount: Annual payment typically saves 15-20%
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 Standard) | ¥1,188 ÷ 12 | ¥99/month |
| CDN (Mainland China) | 100GB × 30 × 0.8 × ¥0.24 | ¥576/month |
| CDN (Taiwan) | 100GB × 30 × 0.2 × ¥0.75 | ¥450/month |
| DDoS Basic Protection | Free | ¥0 |
| Total | ≈¥1,125/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 affects user experience and SEO ranking:
- 1 second slower loading: 7% conversion rate drop
- Not loaded within 3 seconds: 53% of users leave
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 [2025]
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 [2025]
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.