Bind custom domain names (CNAME)

Last Updated: Jul 29, 2017

Users can bind custom domain names (CNAMEs) to their buckets. This operation must be performed through the OSS Console, and is available only when a user applies for an ICP license for the bound domain name and obtains permission from Alibaba Cloud. After the CNAME function is activated, the OSS will automatically process access requests on that domain name.

CNAME application example

  1. User A has the website abc.com which contains a page with the link http://img.abc.com/logo.png. The image img.abc.com needs to be migrated to the OSS.
  2. Through the OSS Console, user A submits an application to bind the user-defined domain name img.abc.com to abc-img, and provides the associated materials for CNAME function approval.
  3. After Alibaba Cloud approves the application, the OSS background will map img.abc.com onto abc-img (permission verification will be performed at this time).
  4. User A, using their own domain name server, then adds a CNAME rule, mapping img.abc.com onto abc-img.oss-cn-hangzhou.aliyuncs.com. This means all access traffic to the user’s img.abc.com domain name will be forwarded to abc-img.oss-cn-hangzhou.aliyuncs.com on the OSS.
  5. Once a request for http://img.abc.com/logo.png reaches the OSS, the OSS will locate the img.abc.com and abc-img mapping and convert the request to an access request for the abc-img bucket. When a user attempts to access http://img.abc.com/logo.png, after passing through the OSS, the website accessed is http://abc-img.oss-cn-hangzhou.aliyuncs.com/logo.png.

CNAME process comparisons

Without bound CNAME:

  1. A request to access http://img.abc.com/logo.png is received.
  2. DNS resolves to the user’s server IP.
  3. Access to logo.png on the user’s server is achieved.

With bound CNAME:

  1. A request to access http://img.abc.com/logo.png is received.
  2. DNS resolves to abc-img.oss-cn-hangzhou.aliyuncs.com.
  3. Access to logo.png in the OSS bucket abc-img is achieved.

Reference

Thank you! We've received your feedback.