Dynamic Route for CDN (DCDN) supports wildcard domain names. This topic introduces wildcard domain names and describes how to add a wildcard domain name to DCDN.

What does the acceleration feature for wildcard domain names do?

The acceleration feature for wildcard domain names accelerates the domain names that match a specified wildcard domain name. You can add a wildcard domain name to DCDN, and domain names that match the wildcard domain name are accelerated. For example, .example.com is a wildcard domain name. The second-level domain a.example.com matches the wildcard domain name. The domain name b.a.example.com is a lower-level domain of a.example.com.

Example: .example.com is added to DCDN as a wildcard domain name. After .example.com is mapped to the CNAME assigned by DCDN, all domain names that match .example.com, such as a.example.com and c.example.com, are mapped to the CNAME of .example.com, and are accelerated by DCDN.
  • Scenario 1: You want few second-level domains that match the wildcard domain name to be accelerated by DCDN. We recommend that you add the second-level domains that you want to accelerate to DCDN. For more information, see Add a domain name.
  • Scenario 2: You want most second-level domains that match the wildcard domain name to be accelerated by DCDN. We recommend that you do not configure CNAME records for the second-level domains that you do not want to accelerate by using DCDN in Alibaba Cloud DNS.
Notice
  • After you add a wildcard domain name in the DCDN console, if the system displays a message that the CNAME is not configured, you need to configure a CNAME record for the wildcard domain name in Alibaba Cloud DNS.
  • DCDN cannot accelerate domain names of the third level or lower. For example, DCDN cannot accelerate the third-level domain b.a.example.com of .example.com.
  • Refresh and prefetch tasks do not support URLs or directories of wildcard domain names. You can specify URLs and directories of specific domain names, including second-level domains. For example, http://example.com/a/b.mp4 is not supported. http://a.example.com/a/b.mp4 is supported.

Rules for adding wildcard domain names

Before you add a wildcard domain name to DCDN, the following requirements must be met:
  • The wildcard domain name must be up to 100 bytes in length.
  • Supported formats of a wildcard domain name include .example.com and *.example.com. Both formats produce the same result. In this example, .example.com is displayed in the console regardless of which format is used.
  • DCDN supports top-level, second-level, and third-level wildcard domain names. A third-level domain contains three periods (.), for example, *.b.example.com.
  • Domain names that match the wildcard domain names incur data transfer fees 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 console. When you use DCDN, you are charged for each wildcard domain name in the same manner as an individual accelerated domain name. DCDN 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 domain names that match the wildcard domain name. For more information, see Download offline logs.

Procedure

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