Binding a User-Defined Domain Name
Prerequisites
A bucket has been created and website files have been uploaded to the bucket.
Procedure
- In the navigation pane on the left of OBS Console, choose Object Storage.
- In the bucket list, click a bucket name, and then the Overview page of the bucket is displayed.
- In the navigation pane, select Domain Name Mgmt.
- Click Bind User Domain Name and enter the user-defined domain name to be bound, as shown in Figure 1.
Currently, the suffix of a user-defined domain name can contain 2 to 6 uppercase and lowercase letters.
- (Optional) Configure CDN acceleration.
You can enable CDN acceleration to implement website acceleration, file download acceleration, and VOD acceleration. For details, see Application Scenarios. For details about how to use CDN to accelerate file download from OBS, see OBS Best Practices.
The CDN acceleration service charges once it is enabled. For details about the price, see the Product Pricing about CDN. In addition, OBS provides pull traffic packages with discounts, so that you can spend less on traffic incurred by CDN acceleration.
CDN Acceleration does not take effect immediately. After binding the domain name, refresh the domain name list to check the status. CDN acceleration takes effect only when the CNAME status changes to Enabled.
If you enable the auto cache refresh function, the configuration takes effect about 5 minutes later after the CNAME status changes to Enabled.
- Click OK.
- Configure a CNAME record on the DNS, and map the user-defined domain name (for example, www.example.com) to the domain name of a bucket. If CDN acceleration is configured, CNAME is obtained from the DNS console.
The CNAME configuration method varies depending on the DNS service provider. In this document, DNS provided by HUAWEI CLOUD is used as an example. For details about how to configure CNAME records with other DNS service 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 of the management console, choose Network > Domain Name Service. The DNS console is displayed.
- In the navigation tree on the left, select Public Zone. The domain name list page is displayed.
- Click the domain name to which you want to add a record set.
- Click Add Record Set on the upper right of the page and go to the Add Record Set page.
- Configure the parameters as instructed. Table 1 shows the parameter description. Retain the default values for the parameters that are not listed in the table.
Table 1 Parameter description Parameter
Parameter description
Example Value
Name
Prefix of the domain name
www
Type
Type of the record set, which should be the CNAME-Canonical name here.
CNAME-Map one domain to another
Alias
Whether you want this record set to be used as an alias for a HUAWEI CLOUD service resource.
No
Line
Used when the DNS server is resolving a domain name. It returns the IP address of the server according to the visitor source.
You must add a Default line to ensure that the website is accessible to all users
Default
TTL (s)
Caching period 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 enabled, the value is the bucket domain name. If CDN acceleration is enabled, the value of this parameter is the CNAME domain name allocated by CDN.
- Click OK.
- Check whether the CNAME configuration takes effect.
Open the command line interface that comes with Windows and run the following command:
nslookup -qt=cname User-defined domain name bound to the bucket
If the CNAME domain name allocated by CDN is displayed, the CNAME configuration has taken effect.
Last Article: User-Defined Domain Name Binding Overview
Next Article: Back to Source (Beta Testing)

Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.