Configuring a User-Defined Domain Name
Prerequisites
As required by the MIIT, you must complete the ICP filing, if the bucket which your domain name is bound to is in any of the following regions:
CN North-Beijing1, CN North-Beijing4, CN East-Shanghai1, CN East-Shanghai2, and CN South-Guangzhou
You have created a bucket and uploaded your website file to it.

If an acceleration domain name is also needed, to prevent objects in OBS buckets from being directly downloaded upon access, you need to perform other required operations after the custom domain name and the acceleration domain name have been configured. For details, see With CDN Acceleration Enabled, Why Are the Objects in My OBS Bucket Directly Downloaded When I Access Them?
Procedure
- In the navigation pane of OBS Console, choose Object Storage.
- In the bucket list, click the bucket name you want. The Objects page is displayed.
- In the navigation pane, choose Domain Name Mgmt.
Figure 1 Domain name management page
- Click Configure User Domain Name in the upper part of the page. Alternatively, click Configure User Domain Name in the lower card area of the page when no user-defined domain names are available. In the displayed dialog box, enter the domain name to configure, as shown in Figure 2.
The suffix of a user-defined domain name can contain 2 to 6 uppercase or lowercase letters.
- Click OK.
- Based on the tips, click Resolve or manually add a CNAME record set. Then, click OK.
Clicking Resolve will automatically add CNAME record sets for Huawei Cloud domain names. To resolve those domain names not registered with Huawei Cloud, you need to configure resolution rules by yourself.
- Configure a CNAME record on the DNS, and map the user-defined domain name (for example, example.com) to the domain name of the bucket.
The CNAME configuration varies depending on DNS providers. For details about how to configure CNAME records with other DNS providers, see Overview.
If your DNS service is provided by Huawei Cloud, perform the following steps to configure a CNAME record:- Log in to the Huawei Cloud console. On the homepage, choose Networking > Domain Name Service. The DNS console is displayed.
- In the navigation pane, choose Public Zones. The domain name list page is displayed.
- Click the domain name which you want to add a record set to.
- Choose the Record Sets tab and click Add Record Set.
- Configure the parameters based on Table 1. Retain the default values for those not listed in the table below.
Table 1 Parameters for adding a record set Parameter
Description
Example Value
Name
Prefix of the domain name
www
Type
Type of the record set, which should be a CNAME-Canonical name here.
CNAME – Map one domain to another
Line
Resolution line. The DNS server will return the IP address of the specified line, depending on where the visitor comes from.
You must add a Default line to ensure that the website is accessible to anyone.
Default
TTL (s)
Cache duration of the record set, in seconds
The default interval is 5 min (300 seconds).
Value
Domain name to be pointed to
- If CDN acceleration is not used, set this parameter to the bucket domain name.
- If CDN acceleration is used, set this parameter to the CNAME record allocated by CDN.
- Click OK.
- Check whether the CNAME configuration takes effect.
Open the Windows command line interface and run the following command:
nslookup -qt=cname User-defined domain name bound to the bucket
- Without CDN acceleration: If the output is the bucket domain name, the CNAME configuration has taken effect.
- With CDN acceleration: If the output is the CNAME record allocated by CDN, the CNAME configuration has taken effect.
Feedback
Was this page helpful?
Provide feedbackFor any further questions, feel free to contact us through the chatbot.
Chatbot