Overview

Huawei Cloud cdn relies on Huawei's global network infrastructure, making it a stable and cost-effective choice.

This article introduces how to configure Huawei Cloud CDN from scratch and how the costs are calculated.

I. Activate CDN Service

Log in to the Huawei Cloud official website, search for "CDN," and click "Activate Now." New users usually receive a free traffic package (for example, 20GB). After activation, enter the console.

II. Add an Accelerated Domain

In the CDN console, click "Add Domain."

Accelerated domain: Enter the website domain you want to accelerate. It is recommended to use a subdomain (such as static.baike300.com) rather than the main domain directly.

Business type: For an ordinary website, choose "File Download Acceleration" or "VOD Acceleration"; if the site mainly uses small files such as images, CSS, and JS, choose "Static Acceleration."

Origin configuration: Enter your server's IP or domain. If it is a Huawei Cloud ECS, you can choose "Elastic Cloud Server IP"; you can also enter your own origin domain.

Port: If the website supports HTTPS, check port 443.

III. Configure CNAME

After adding the domain, Huawei Cloud will generate a CNAME address. Go to your domain DNS provider (Huawei Cloud DNS, Alibaba Cloud, Cloudflare, etc.) and add a CNAME record to point the accelerated domain to this CNAME address.

After configuration, it usually takes effect in 10–30 minutes.

IV. Configure HTTPS Certificate

If your website has HTTPS enabled, you need to upload an SSL certificate in the CDN console. Huawei Cloud also provides free SSL certificates (one-year validity). Apply for one in "Cloud Certificate Management Service" and deploy it to CDN.

In the domain configuration, enable "HTTPS Acceleration," and it is recommended to check "Force Redirect" (HTTP automatically redirects to HTTPS).

V. Cache Rule Settings

Huawei Cloud CDN allows custom cache rules. It is recommended to set longer cache times for common static files: images (jpg, png, gif) cached for 30 days; CSS and JS cached for 7 days; HTML files cached for 1 hour or not cached. This reduces back-to-origin requests and improves hit rate.

In addition, you can enable "Smart Compression" (Gzip/Brotli) to automatically compress HTML, CSS, and JS files, reducing transmitted bytes.

VI. Pricing Explanation

Huawei Cloud CDN uses tiered traffic billing, starting from 0.24 CNY/GB, with lower unit prices for higher usage.

  • 0–10TB: 0.24 CNY/GB
  • 10–50TB: 0.20 CNY/GB
  • 50–100TB: 0.18 CNY/GB

HTTPS request fee: 0.05 CNY per 10,000 requests. For a personal blog, this cost is very low.

New users usually have a 20GB free traffic package, and charges only apply after it is used up.

VII. Integrating with WordPress

If you use WordPress, you can install the "Huawei Cloud CDN Cache" plugin or use a third-party object storage plugin (such as WPQINIU with a changed endpoint) to offload static resources to Huawei Cloud CDN. A simpler method: directly point the accelerated domain to your origin domain in the CDN console, with no changes needed in WP.

It is recommended to enable "User-Friendly Links" in WP's "Permalinks" settings and combine it with CDN directory cache rules to improve SEO.

VIII. Points to Note

  • The accelerated domain must have completed ICP filing in mainland China; otherwise, China CDN nodes cannot be used.
  • If the website has a lot of dynamic content (such as user login or shopping carts), it is recommended not to cache dynamic pages or to set an extremely short cache time to avoid displaying old data.
  • Regularly refresh the CDN cache, especially after updating articles or modifying styles.

Huawei Cloud CDN Official Link: https://www.huaweicloud.com/product/cdn.html