Estos contenidos se han traducido de forma automática para su comodidad, pero Huawei Cloud no garantiza la exactitud de estos. Para consultar los contenidos originales, acceda a la versión en inglés.
Actualización más reciente 2024-09-18 GMT+08:00

Overview

Application Scenario

After you upload a file to a bucket, you can access this file using the bucket's access domain name by default. If you want to use a custom domain name to access the file, bind the custom domain name to the bucket.

Assume that you have a domain name www.example.com and you upload an image image.png to an OBS bucket. As long as you bind www.example.com to the bucket, you can use http://www.example.com/image.png to access 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 the request to the image.png file stored in the bucket. This way, a request for http://www.example.com/image.png actually accesses http://Bucket domain name/image.png.

Limitations and Constraints

  1. Only buckets with version 3.0 or later support user-defined domain name configuration. The version number of a bucket is displayed in the Basic Information area.
  2. By default, a bucket can have up to 20 user-defined domain names bound.
  3. User-defined domain names currently allow requests over only HTTP, but not HTTPS.

    If you want to use a bound domain name to access OBS over HTTPS, you need to enable CDN to manage HTTPS certificates.

    For details about how to manage HTTPS certificates on the CDN management console, see HTTPS Settings.

  4. A user-defined domain name can be bound to only one bucket.
  5. The suffix of a user-defined domain name can contain 2 to 6 uppercase or lowercase letters.