• Home
Home
Anti-DDoS CDNStatic & dynamic acceleration, edge scrubbingAnti-DDoS IP forwardingL4 forwarding with protected IPsSDK game shieldClient SDK for gaming workloadsAnti-DDoS serversDedicated compute with high availabilityLearn more
Gaming solutionLow latency + protectionFinancial solutionCompliance & scrubbingLive streaming solutionPush/pull at the edgeBlockchain solutionWeb3 infra protectionExplore
DocumentationAPIs & onboardingHelp centerFAQs & ticketsBlog & newsUpdates & best practicesGlobal speed testMulti-region performance checksTag cloudTopic map across the siteOpen docs
AboutMission & visionCareersHiringPartnersEcosystemContactSales & supportContact us

Documentation

  • Introduction
  • Best Practices
Docs/Domain Management/CNAME Configuration

CNAME Configuration

速盾网络 Team
Docs

On this page

No outline

Share

𝕏fin

Enterprise CDN & acceleration with AI-driven monitoring and full-spectrum, real-time DDoS/CC protection. Trusted by tens of thousands of companies for fast, secure, and reliable content delivery and DDoS mitigation.

Product

  • Anti-DDoS CDN
  • Anti-DDoS IP forwarding
  • SDK game shield
  • Anti-DDoS servers

Solutions

  • Gaming solution
  • Financial solution
  • Live streaming solution
  • Blockchain solution

Resources

  • Documentation
  • Help center
  • Blog & news
  • Global speed test

Company

  • About
  • Careers
  • Partners
  • Contact

© 2026-2028 sudun.com 保留所有权利

  • Privacy
  • Terms
  • Cookies

CNAME Configuration

CNAME (Canonical Name) records are used to point your domain to Sundun's CDN network. This guide explains how to configure CNAME records for optimal performance and security.

Understanding CNAME Records

A CNAME record creates an alias from your domain to Sundun's edge servers. When a user visits your website, DNS resolution directs them to the nearest Sundun Point of Presence (PoP).

code
User Request → DNS Lookup → CNAME Resolution → Sundun Edge → Origin Server

Getting Your CNAME Target

After adding a domain to Sundun, you'll receive a unique CNAME target:

  1. Go to Domains in your dashboard
  2. Select your domain
  3. Navigate to DNS Settings
  4. Copy your CNAME target (format: example-com.Sundun.net)

Configuring CNAME Records

For Subdomains (www, api, cdn, etc.)

Add a CNAME record in your DNS provider:

FieldValue
TypeCNAME
Name/Hostwww (or your subdomain)
Target/Points toyour-domain.Sundun.net
TTL300 (or Auto)

Example DNS Configuration:

code
www.example.com. 300 IN CNAME example-com.Sundun.net. api.example.com. 300 IN CNAME example-com.Sundun.net. cdn.example.com. 300 IN CNAME example-com.Sundun.net.

For Root/Apex Domains

Root domains (example.com without www) cannot use standard CNAME records due to DNS RFC restrictions. Use one of these alternatives:

Option 1: CNAME Flattening (Recommended)

Some DNS providers support CNAME-like functionality at the apex:

ProviderFeature Name
CloudflareCNAME Flattening
AWS Route 53Alias Records
DNSimpleALIAS Records
NS1Linked Records

Option 2: Use Sundun DNS

Transfer your DNS to Sundun for full apex domain support:

  1. Go to DNS Management in your dashboard
  2. Click Enable Sundun DNS
  3. Update your domain's nameservers to:

- ns1.Sundun.com

- ns2.Sundun.com

Option 3: A Record with Anycast IPs

Use Sundun's Anycast IP addresses (Enterprise only):

code
example.com. 300 IN A 198.51.100.1 example.com. 300 IN A 198.51.100.2

Note: Contact support to obtain Anycast IPs for your account.

Verifying CNAME Configuration

Using Command Line

bash
# Check CNAME record dig www.example.com CNAME # Expected output ;; ANSWER SECTION: www.example.com. 300 IN CNAME example-com.Sundun.net. # Verify resolution dig www.example.com A # Should resolve to Sundun edge IPs

Using Online Tools

  • DNS Checker - Check global propagation
  • MXToolbox - DNS lookup and diagnostics

From Sundun Dashboard

  1. Go to Domains → Select your domain
  2. Click Verify DNS
  3. The system will check your CNAME configuration

DNS Propagation

DNS changes can take time to propagate globally:

TTL SettingTypical Propagation
300 (5 min)5-30 minutes
3600 (1 hr)1-4 hours
86400 (24 hr)Up to 48 hours

Tips for faster propagation:

  1. Lower your TTL to 300 before making changes
  2. Wait for the old TTL to expire
  3. Make the CNAME change
  4. Verify propagation across multiple regions

Multiple CNAME Targets

For advanced configurations, you may need different CNAME targets:

Use CaseCNAME Target Format
Standard CDNdomain.Sundun.net
China Accelerationdomain.Sundun.cn
Video Streamingdomain-media.Sundun.net
API Gatewaydomain-api.Sundun.net

Common Issues

CNAME Conflict with MX Records

If you have email on the same subdomain:

code
# This will NOT work - CNAME conflicts with MX mail.example.com CNAME example-com.Sundun.net mail.example.com MX mailserver.example.com # Solution: Use a different subdomain for CDN cdn.example.com CNAME example-com.Sundun.net

CNAME Chain Too Long

Avoid creating CNAME chains:

code
# Bad - creates a chain www.example.com → alias.example.com → example-com.Sundun.net # Good - direct CNAME www.example.com → example-com.Sundun.net

SSL Certificate Errors After CNAME

If you see certificate errors:

  1. Ensure HTTPS certificates are configured in Sundun
  2. Wait for certificate provisioning (up to 15 minutes)
  3. Check that the certificate covers your domain

Best Practices

  1. Use low TTLs initially: Set TTL to 300 when first configuring
  2. Test before going live: Use staging subdomains first
  3. Monitor after changes: Check your dashboard for traffic patterns
  4. Keep DNS records documented: Maintain a record of all DNS configurations
  5. Use DNSSEC: Enable DNSSEC for additional security (if supported)

API Reference

Configure CNAME settings via API:

bash
# Get CNAME target for a domain curl -X GET https://api.Sundun.com/v1/domains/example.com/dns \ -H "Authorization: Bearer YOUR_API_KEY" # Response { "cname_target": "example-com.Sundun.net", "status": "active", "verification": "verified" }

Need help with DNS configuration? Contact support@Sundun.com