Alibaba Cloud CDN supports wildcard domain names. This topic introduces wildcard domain names and describes how to add a wildcard domain name to Alibaba Cloud CDN.

What is acceleration of wildcard domain names?

Acceleration of wildcard domain names refers to the acceleration of domain names that match a specified wildcard domain name. You can add a wildcard domain name to Alibaba Cloud CDN and domain names that match the wildcard domain name are accelerated. For example, .aliyundoc.com is a wildcard domain name. The third-level domain name example.aliyundoc.com matches the wildcard domain name. The domain name image.developer.aliyundoc.com is a lower-level domain name of a.aliyundoc.com.

Example: .aliyundoc.com is added to Alibaba Cloud CDN as a wildcard domain name. After .aliyundoc.com is mapped to the CNAME assigned by Alibaba Cloud CDN, all domain names that match .aliyundoc.com, such as example.aliyundoc.com and demo.aliyundoc.com are mapped to the CNAME of .aliyundoc.com, and are accelerated by Alibaba Cloud CDN.

Notice
  • A wildcard domain name can match only domain names of the same level as the wildcard domain name. For example, .aliyundoc.com cannot be used to match image.developer.aliyundoc.com.
  • Alibaba Cloud CDN identifies .com.cn, .net.cn, .edu.cn, and .org.cn as top-level domain names. For example, the wildcard domain name .aliyundoc.com.cn is a third-level domain name. In this case, example.aliyundoc.com is a third-level domain name and image.developer.aliyundoc.com is a fourth-level domain name.
  • When you refresh or prefetch content from an origin server based on URLs or directories, they cannot be the URLs or directories of a wildcard domain name. You must specify URLs or directories of a specific domain name. For example, http://aliyundoc.com/example/video.mp4 is not supported buthttp://a.aliyundoc.com/example/video.mp4 is support.

Rules for adding wildcard domain names

When you add a wildcard domain name to Alibaba Cloud CDN, take note of the following rules:
  • The wildcard domain name must be less than 100 bytes.
  • Supported formats of a wildcard domain name include .aliyundoc.com and *.aliyundoc.com. Both formats produce the same result. In this example, .aliyundoc.com is displayed in the console no matter which format is used.
  • Alibaba Cloud CDN supports top-level, second-level, third-level, and fourth-level wildcard domain names. A forth-level domain name contains three periods, for example, *.example.aliyundoc.com.
  • Domain names matched by wildcard domain names incur data transfer fees in the same way as specific domain names. Data usage generated by domain names matched by wildcard domain names is summarized and displayed on the Resource Monitoring page of the console. Alibaba Cloud CDN treats each wildcard domain name as an individual accelerated domain name. Therefore, Alibaba Cloud CDN provides billing details of wildcard domain names (accelerated domain names) instead of the domain names that match the wildcard domain names.

Logs of wildcard domain names

A log file is generated for each wildcard domain name at each time interval. The log file contains log data of all the domain names that match the wildcard domain name. For more information about logs, see Log management.

Procedure

  1. Log on to the Alibaba Cloud CDN console.
  2. Add a wildcard domain name to Alibaba Cloud CDN. For more information, see Add a domain name to Alibaba Cloud CDN.