Before we start configuring, let's briefly recap: CDNs (Content Delivery Networks) greatly improve access speed, reduce latency, and reduce the pressure on origin servers by caching your website content to edge nodes around the world, allowing users to retrieve data from the nearest nodes.
If you've decided to connect your website to a CDN, the next question is: how do you do it? Today, we're taking the highly acclaimed Sudun CDN on the market as an example to provide you with a complete configuration guide from scratch.
Chapter 1: Preparation - Register a Sudun CDN account
Before you start the configuration, you need to have a Sudun CDN account:
- Go to the Sudun CDN official website () and click the "Register" button in the upper right corner.
www.Sudun.com
- Fill in your email address, set a password, and complete email verification.
- Choose a package based on your needs. Sudun offers a free tier (for personal blogs, small websites) and a variety of paid tiers (for businesses, e-commerce, and media stations).
Chapter 2: Add your first accelerated domain name
2.1 Fill in the domain name information
Click "Add Domain Name" in the console and fill in the following core information:
- Accelerated domain name: Enter the domain name of the website you want to accelerate, such as .
www.example.com
- Business type: For ordinary websites, you can choose "Web Acceleration" or "Full Site Acceleration".
The origin server is your origin server, and you need to tell Sudun where to pull the content:
- Origin IP: Fill in the server's public IP address directly.
- Origin domain name: Fill in such as (not the same as accelerated domain name).
origin.example.com
- Port and protocol: Specify the back-to-origin port (80/443) and protocol (HTTP/HTTPS). It is recommended that the origin server support HTTPS to ensure the security of origin return.
At the heart of a CDN is caching. Find the "Cache Configuration" option in the Sudun console:
- Global caching rules: Set the default expiration time (e.g., 30 days for static resources, 1 hour for HTML pages).
- Set by file type: set long cache for , , , ; Set short or no caching for API interfaces.
.jpg``.css``.js
- Ignore query strings: Enable this feature to ignore URL suffix parameters (such as , ) to unify cached content and significantly improve hit rates.
?v=1.0
Chapter 4: HTTPS Configuration - Encryption and Acceleration at the Same Time
- Apply for a free SSL certificate: Select Apply on the "HTTPS Configuration" page, and the system will automatically verify domain ownership and deploy it.
- Forced HTTPS: After the certificate is deployed, enable HTTP to automatically jump to HTTPS to ensure full-link encryption.
- Advanced Settings: TLS 1.2/1.3 is recommended to be enabled and HSTS is turned on.
Chapter 5: CNAME Analysis - Bringing Traffic to CDN
This is the most crucial step, and you need to modify the DNS resolution of your domain.
- Get CNAME record value: Copy the CNAME value displayed in the domain name list (such as . ).
www.example.com.Sudun.cdn.com
- Log in to the DNS management dashboard: Find the domain name resolution settings.
- Add a record: Select the record type, fill in the host record, and paste the record value with the CNAME address you just copied.
CNAME``www
Chapter 6: Verify whether the CDN is effective
- Online tool detection: Use the Ping tool to check if the resolved IP belongs to a Sudun node.
- Browser Developer Tools: Check if or is included in Response Headers.
X-Cache: HIT``Via: Sudun-cdn
- Command line validation: Execute to view header information.
curl -I https://你的域名
Chapter 7: Advanced Configuration and Optimization (Optional)
- Smart Compression: Turn on Brotli compression to further reduce file size.
- Image Optimization: Enable WebP adaptive conversion.
- Edge Rules: Write simple logic to implement A/B tests or specific redirects.
- Security: Enable built-in WAF protection against SQL injection and CC attacks.
- Cache refresh and warm-up: Perform manual refresh after updating content, and perform warm-up before the promotion.
Chapter 8: Frequently Asked Questions and Precautions
- Website won't open? Check whether the origin server has released the return IP of the Sudun node.
- Resources are not accelerating? Check if the response header is set to .
Cache-Control``no-cache
- How to migrate? Complete the configuration in Sudun first, then modify the DNS resolution, and turn off the old CDN after observing that there are no errors.
Chapter 9: Summary - Start the acceleration journey
By following these steps, your website will enjoy global acceleration, high availability, and strong security. Configuring a CDN is only the first step, and you can continuously optimize your caching strategy and edge computing logic based on Sudun.com's access data.