Updated on 2022-08-16 GMT+08:00

User-Defined Domain Name Binding Overview

Application Scenario

After a file is uploaded to a bucket, you can access this file using the bucket's domain name by default. If you want to access the file using a user-defined domain name, you can bind this domain name to the bucket.

Assuming that you have a domain name www.example.com and there is an image image.png in an OBS bucket, after you bind www.example.com to the bucket, you can use http://www.example.com/image.png to access image image.png. The steps below describe the configurations:

  1. Create a bucket on OBS and upload file image.png to the bucket.
  2. On OBS Console, bind www.example.com to the created bucket.
  3. On the DNS server, add a CNAME record and map www.example.com to the domain name of the bucket.
  4. Send a request for image image.png. After the request for http://www.example.com/image.png reaches OBS, OBS finds the mapping between the www.example.com and the bucket's domain name, and redirects it to the image.png file stored in the bucket. That is, a request for http://www.example.com/image.png actually accesses http://Bucket domain name/image.png.

Limitations and Constraints

  1. Only buckets whose version is 3.0 support user-defined domain name binding. The version number of a bucket is displayed in the Basic Information area.
  2. Currently, user domain names bound to OBS only allow access requests over HTTP.
  3. A user-defined domain name can be bound to only one bucket.
  4. Currently, the suffix of a user-defined domain name can contain 2 to 6 uppercase and lowercase letters.