Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Adding a Domain Name

Updated on 2025-01-09 GMT+08:00

If you want to use CDN to accelerate access to your site, add the domain name of your site to CDN. CDN caches origin content on PoPs so that your content loads faster.

Preparations

  • Enable CDN for your account by referring to Enabling CDN.
  • Prepare a domain name for acceleration and an origin server (service server) based on the domain name admission conditions, content moderation requirements, and domain name description in the Restrictions.

Procedure

  1. Log in to Huawei Cloud console. Choose Service List > Content Delivery & Edge Computing > Content Delivery Network.

    The CDN console is displayed.

  2. In the navigation pane, choose Domains.
  3. On the Domains page, click Add Domain Names and specify domain parameters.
    Figure 1 Adding a domain name

    Table 1 Parameter description

    Parameter

    Item

    Description

    Domain Names

    -

    • A domain name can contain up to 200 characters, including letters, digits, hyphens (-), periods (.), and asterisks (*). Start with a letter, digit, or asterisk.
    • Each label of a domain name (for example, *** in ***.***.com) can contain up to 63 characters.
    • You can add up to 100 domain names under each account.
    • CDN does not allow access from websites containing illicit content. For details, see "Content moderation" in Restrictions. The existing domain names connected to CDN are reviewed regularly. If a domain name involves any violations, the CDN acceleration service will be suspended for the domain name and other domain names in your account.
    • If a domain name has been in the Disabled or Rejected state for more than 120 days, CDN starts the domain name deletion process and deletes the domain name records after confirmation. If CDN acceleration is required for the domain name, add the domain name again.
    • If a domain name has not been accessed for more than 180 days, CDN starts the domain name suspension process and disables CDN acceleration for the domain name after confirmation.
    • An acceleration domain name must be unique.
    • You can add a domain name including a wildcard (*). For example, if you add *.test.com to CDN as an acceleration domain name and have it resolved to the CNAME provided by CDN, all of the level-2 domain names under *.test.com, such as a.test.com, will enjoy CDN acceleration by default. However, level-3 domain names (such as b.a.test.com) would not.
      1. If you add a wildcard domain name to a particular account, you cannot add any of the level-2 domain names under that domain name to other accounts.
      2. You will be billed for the acceleration service provided to all of the level-2 domain names under a wildcard domain name. If there are multiple level-2 domain names, billing will be based on the traffic generated by the wildcard domain name, not on each of the level-2 domain names.

    Enterprise Project

    -

    This parameter is only available if Huawei Cloud Enterprise Project Management Service is enabled. For details, see Enterprise Management User Guide.

    Service Area

    Global

    CDN schedules access requests from users around the world to the optimal PoP nearby. The domain name must be licensed by the MIIT. For details, see ICP License Service.

    Chinese mainland

    CDN schedules access requests from users around the world to PoPs in the Chinese mainland. The domain name must be licensed by the MIIT. For details, see ICP License Service.

    Outside Chinese mainland

    CDN schedules access requests from users around the world to PoPs outside the Chinese mainland. The domain name does not need to be licensed by the MIIT.

    Service Type

    Website

    CDN is perfect for web portals, e-commerce platforms, news apps, and user generated content (UGC)-focused apps. The cache format includes but is not limited to .zip, .exe, .wmv, .gif, .png, .bmp, .wma, .rar, .jpeg, and .jpg.

    File download

    CDN is useful for download clients, game clients, app stores, and websites that provide download services based on HTTP or HTTPS.

    On-demand services

    CDN accelerates delivery of on-demand services, such as online education, video sharing, music or video on demand, and other audiovisual content.

    Whole site

    CDN is a good option for websites that consist of both dynamic and static content and for sites that involve a large number of ASP, JSP, or PHP requests.

    NOTE:

    WSA is an independent cloud service and is billed separately. It shares the same console with CDN. You need to enable WSA before adding Whole site domain names. For details about how to enable WSA, see Enabling WSA.

    Origin Protocol

    -

    Protocol used by CDN PoPs to pull content from the origin server.

    • HTTP
    • HTTPS (Ensure that the origin server supports HTTPS access.)
    • Same as user: The origin protocol is the same as the client access protocol. For example, if a client accesses CDN using HTTP, CDN also uses HTTP for origin pull.
  4. In the Origin Server Settings area, click Add Origin Server to add an origin server for the domain names.
    Figure 2 Adding an origin server
    Table 2 Parameters

    Parameter

    Description

    Type

    IP address

    • CDN PoPs access the IP address directly to pull origin content.
    • IPv4 is supported, but IPv6 is not supported.
    • If multiple IP addresses are configured, CDN uses the load balancing mechanism to pull content from the origin server.

    Domain name

    • Start with a letter or digit. Enter up to 255 characters, including letters, digits, hyphens (-), and periods (.).
    • An origin domain cannot be the same as an acceleration domain name.
    • You can also enter the domain name of an object storage bucket in this field.
    NOTE:
    • You cannot use private object storage buckets as origin servers when you set Type to Domain name.
    • If you use an object storage bucket as your origin server, the object storage service will charge the CDN origin pull traffic based on its billing standards.

    OBS bucket

    Select an OBS bucket domain name under your account or customize one. OBS charges the CDN origin pull traffic based on the billing standard for outgoing Internet traffic. If you set a bucket of OBS 3.0 or a later version as the origin server, you can purchase OBS pull traffic packages to deduct origin pull traffic. For details, see OBS Billing for CDN Acceleration.

    Notes:

    1. If your OBS private bucket is unsuitable as an origin for your domain name, do not set the private bucket as the origin server.
    2. If you enter a custom OBS bucket domain name, the origin domain name must end with .myhuaweicloud.com or .myhuaweicloud.cn.
    3. If an OBS private bucket is configured as an origin server, enable OBS authorization and select the Private bucket option. Otherwise, origin pull will fail.
    4. To use a custom OBS private bucket as the origin server, configure a policy for the private bucket. For details, see Configuring a Policy for a Custom OBS Private Bucket.
    5. If you have enabled static website hosting for your OBS bucket, select the Static website hosting checkbox when adding a domain name. In this way, the list of all files in the bucket will not be displayed when users access the bucket.
    6. When back-to-source by mirroring is configured on OBS and range requests are enabled on CDN, if the mirror origin server does not comply with the RFC Range Requests standard, the response to range requests is not 206 and CDN fails to pull content. In this case, submit a service ticket.
      NOTE:

      If you use an OBS bucket created after January 1, 2022 as the origin server and want to enable online preview, log in to the CDN console, choose Domains in the navigation pane, click the target domain name, click the Advanced Settings tab, click Edit next to HTTP Headers, and set Content-Disposition to inline. For details, see How Do I Preview OBS Objects in My Web Browser?

    Address

    Address accessed by CDN PoPs during origin pull.

    Bucket

    This parameter is mandatory when Type is set to OBS bucket.

    • Public bucket: public read. All users can read objects in the bucket.
    • Private bucket: Only users granted permissions by the ACL can access the bucket.

    Priority

    The origin server can be primary or standby. The priority of the primary origin server is higher than that of the standby origin server. CDN PoPs preferentially pull content from the primary origin server. If the primary origin server is faulty, CDN PoPs pull content from the standby origin server.

    • Configure at least one primary origin server.

    Origin Ports

    Port numbers for CDN PoPs to pull content. By default, the HTTP port is 80 and the HTTPS port is 443.

    • If Type is set to OBS bucket, the port numbers cannot be changed.

    Host Header

    A host is specified in the HTTP request header. It is the domain name of the site accessed by CDN PoPs when CDN pulls content from the origin server. CDN obtains resources from the corresponding site based on the host details during origin pull.

    After a domain name is added, the default host will be the domain name. Change the host in a timely fashion if either of the following conditions is met:
    • If you set Type to Domain name and enter the domain name of an object storage bucket, set the host to the domain name of the object storage bucket.
    • If you want CDN to pull content from a custom domain name, specify the host. For example, suppose an origin server is bound to two sites, www.origin01.com and www.origin02.com, and the domain name connected to CDN is www.example01.com. If you need CDN to pull content from www.origin02.com, you would need to set the host to www.origin02.com.
  5. Click OK. To add multiple origin servers, repeat 4. You can add up to 50 origin servers.
  6. After adding origin servers, click OK in the lower left corner of the page.
NOTE:
  • The configuration takes 5 to 10 minutes to take effect. When Status of the domain name becomes Enabled, the domain name has been added.
  • If the CNAME status of a domain name is , no CNAME has been configured for this domain name.

Recommended Configuration

You can also follow the instructions of (Optional) Recommended Configurations to configure cache rules, usage caps, and HTTPS certificates for domain names, to improve access performance, cache hit ratio, and access security and reduce high bill risks.

Configuring CNAME Resolution

After a domain name is added, the system automatically assigns a CNAME to this domain name. The CNAME cannot be accessed directly. You must add the CNAME to your domain's DNS records. Then requests for your domain name will be redirected to CDN PoPs for acceleration.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback