Manage a domain name

Last Updated: Aug 30, 2017

After uploading an object to a bucket, you can obtain an object address including two parts: an OSS domain name address (<BucketName>.<Endpoint>) and an object file name. To avoid possible cross-origin or security problems in your business, we recommend that you access OSS using a user-defined domain name. After the domain name is successfully bound, you also need to add a CNAME record pointing to the Internet domain name of the bucket to ensure proper domain name-based access to the OSS.

Note:

  • You must apply for an ICP license for your bound domain name. Otherwise, the domain name will not be accessible.
  • Each bucket can be bound with a maximum of 20 domain names.

After a user-defined domain name is successfully bound, access addresses of the files stored in your OSS will use the user-defined domain name. For example, if your bucket test-1-001 is located at the Hangzhou node, the object file name is test001.jpg, and the bound user-defined domain name is hello-world.com, then the access address of this object is as follows:

  • Before binding: test-1-001..oss-cn-hangzhou.aliyuncs.com/test001.jpg
  • After successful binding: hello-world.com/test001.jpg

Bind a domain name

  1. Go to the OSS console.

  2. Select a bucket to open the Bucket Overview page.

  3. Select Bucket Settings > Domain Management.

  4. Click Add Domain Name.

  5. Enter the domain name you want to bind in the dialog box.

  6. Click Next. The Add Canonical Name page is displayed.

    NOTE: If the domain name you want to bind has been maliciously bound by another user, you can verify the ownership of the domain name by adding a TXT record. In this way, the domain name can be forcibly bound to the correct bucket and its binding to the previous bucket is released.

  7. Select the automatic or manual adding method.

    • Add automatically: The system will automatically add the corresponding CNAME record in the Alibaba Cloud DNS. Make sure you change the domain name’s DNS to Alibaba Cloud DNS if this domain name has not been resolved in Alibaba Cloud DNS already.

    • Add manually: Select this option if the domain name has already been resolved in the Alibaba Cloud DNS of another account.

  8. Click Finish to complete domain name binding.

Verify domain name ownership

  1. Wait for the system to generate a TXT record based on your information.

  2. Log on to your DNS provider and add the corresponding TXT record.

  3. Click Verify on the console. If the system detects that the TXT record value for this domain name is as expected, the domain name ownership passes verification.

Thank you! We've received your feedback.