Bind custom domain names (CNAME)

Last Updated: Dec 07, 2017

You can bind custom domain names (CNAMEs) to their buckets. This operation is required to be performed through the OSS console, and is available only when you apply for the ICP license to obtain the bound domain name and permission from Alibaba Cloud.

Once the CNAME function is activated, OSS automatically starts to process the access requests on that domain name.

CNAME application example

  1. User A has a 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 OSS.

  2. Through 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. Once Alibaba Cloud approves the application, the OSS background maps img.abc.com onto abc-img (permission verification is performed during this time).

  4. User A uses his own domain name server, and 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 is forwarded to abc-img.oss-cn-hangzhou.aliyuncs.com on OSS.

  5. Once the request for http://img.abc.com/logo.png reaches OSS, it locates the img.abc.com and abc-img mapping and converts the request to access request for the abc-img bucket. When a user attempts to access http://img.abc.com/logo.png, after passing through 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

For operation process of the console, see Manage a domain name.

Thank you! We've received your feedback.