All Products
Search
Document Center

:Does Alibaba Cloud CDN support wildcard domain names?

Last Updated:Mar 02, 2026

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?

Wildcard domain name acceleration lets you accelerate all subdomains that match a specified wildcard domain name. For example, .aliyundoc.com is a wildcard domain name. example.aliyundoc.com is a second-level domain name of .aliyundoc.com, and image.developer.aliyundoc.com is a third-level domain name of .aliyundoc.com.

For example, you can add .aliyundoc.com as an accelerated domain name. After you map the wildcard domain name .aliyundoc.com to the CNAME generated by CDN, all its second-level domain names, such as example.aliyundoc.com and demo.aliyundoc.com, are resolved to the CNAME of the wildcard domain name .aliyundoc.com for acceleration.

Important
  • Alibaba Cloud CDN does not accelerate domain names at levels lower than the second-level domain name for a root domain wildcard. For example, if you add the wildcard domain name .aliyundoc.com, the second-level domain name example.aliyundoc.com can be accelerated by Alibaba Cloud CDN. However, the third-level domain name image.developer.aliyundoc.com cannot be accelerated. If a request for the third-level domain name image.developer.aliyundoc.com is sent to a point of presence (POP), the POP rejects the request and returns a 403 status code.

  • The Alibaba Cloud CDN platform identifies domain name suffixes such as .com.cn, .net.cn, .gov.cn, .edu.cn, and .org.cn as top-level domains. For a complete list of domain name suffixes, visit https://publicsuffix.org/list/public_suffix_list.dat. For example, .aliyundoc.com.cn is a wildcard domain name. In this case, example.aliyundoc.com.cn is a second-level domain name and image.developer.aliyundoc.com.cn is a third-level domain name.

  • When you purge or prefetch content from the cache, you cannot use URLs or file directories of wildcard domain names. You can purge or prefetch URLs and directories of exact-match domain names, such as second-level domain names. For example, you cannot purge or prefetch http://.aliyundoc.com/example/b.mp4, but you can purge or prefetch http://example.aliyundoc.com/example/b.mp4.

Rules for adding wildcard domain names

When you add a wildcard domain name to Alibaba Cloud CDN, take note of the following rules:

  • The total length of the domain name (for example, image.example.com) cannot exceed 100 characters.

  • The part of the domain name that precedes the root domain cannot exceed 64 characters. For example, for the domain name image.example.com, the part that precedes the root domain example.com is image.

  • A wildcard domain name can be in either of the following formats: .aliyundoc.com or *.aliyundoc.com. Both formats have the same effect. In the Alibaba Cloud CDN console, the domain name is displayed as .aliyundoc.com regardless of which format you use.

  • Alibaba Cloud CDN supports multi-level wildcard domain names, such as *.example.aliyundoc.com, *.image.example.aliyundoc.com, and *.cat.image.example.aliyundoc.com.

  • You are charged data transfer fees for domain names that are matched by wildcard domain names in the same manner as specific domain names. Data usage generated by domain names that are matched by wildcard domain names is summarized and displayed on the Resource Monitoring page of the Alibaba Cloud CDN console. Alibaba Cloud CDN considers each wildcard domain name as an individual accelerated domain name. Therefore, Alibaba Cloud CDN provides the 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 domain names that match the wildcard domain name. For more information about logs, see Overview.

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.