If you want to add multiple domain names that are hosted by the same server to an Anti-DDoS Premium instance, we recommend that you apply for CNAME reuse. This feature allows you to configure the instance only once and map multiple domain names hosted by the same server to a CNAME record. After CNAME reuse is enabled, you can modify the CNAME record to map the domain names hosted by the same server to the CNAME record assigned by Anti-DDoS Premium.

Prerequisites

The CNAME reuse feature is enabled. To enable this feature, you must submit a ticket.
Note Only Anti-DDoS Premium supports CNAME reuse.

Scenarios

CNAME reuse is suitable for the following scenarios:
  • Customers, such as agents, independent software vendors (ISVs), and distributors that want to add a large number of domain names to an Anti-DDoS Premium instance. Most of the domain names are hosted by the same server and the number of domain names changes frequently.
  • Multiple top-level domain names are used for the promotion and search engine optimization (SEO) of the same service, and the domain names need to be added to an Anti-DDoS Premium instance.
  • Multiple backup domain names are required for a service, and the domain names need to be added to an Anti-DDoS Premium instance.

Limits

The following table describes the limits of CNAME reuse.

Limit Description
Protocol Only HTTP is supported.
Origin server The domain names that are mapped to the same CNAME record must be hosted by the same origin server.

Enable CNAME reuse

You can use the CNAME reuse feature together with Sec-Traffic Manager. If you enable CNAME reuse, you can choose whether to use Sec-Traffic Manager. For more information about Sec-Traffic Manager, see Sec-Traffic Manager.
  • To use the CNAME reuse feature together with Sec-Traffic Manager, you must select a scheduling rule. Then, the CNAME record configured in the scheduling rule is reused.
  • If you do not use Sec-Traffic Manager, the CNAME record assigned by Anti-DDoS Premium is reused.
The following configuration descriptions are based on the following assumptions:
  • The origin server has two IP addresses: 1.1.1.1 and 2.2.2.2.
  • IP address 1.1.1.1 hosts three domain names: a.test, b.test, and c.test.

The following procedure describes how to use the CNAME reuse feature to add multiple domain names, such as a.test, b.test, and c.test, that are hosted on the IP address 1.1.1.1 to an Anti-DDoS Premium instance.

  1. Enable CNAME reuse when you configure a website.
    1. Log on to the Anti-DDoS Premium console.
    2. In the top navigation bar, select Outside Mainland China.
    3. In the left-side navigation pane, choose Provisioning > Website Config.
    4. Add a domain name and enable CNAME Reuse, or enable this feature for an existing domain name. For more information about how to add a domain name, see Add a website.
      Assume that the IP address of the origin server is 1.1.1.1 and the domain name is a.test.
      Enable CNAME reuse for a domain name
  2. Specify whether to use Sec-Traffic Manager. Update the CNAME record of the protected domain name.
    If you enable CNAME reuse, you must specify whether to use Sec-Traffic Manager.
    • Enable CNAME reuse without Sec-Traffic Manager.
      1. In the Select Traffic Scheduling Rule dialog box, select Without Sec-Traffic Manager and click OK.Enable CNAME reuse without Sec-Traffic Manager
      2. After a domain name is added, record the CNAME record assigned for the domain name.
      3. Go to the DNS provider that has the protected domain name and modify the DNS records for all the domain names (a.test, b.test, and c.test) that are hosted on the IP address 1.1.1.1. Use the obtained CNAME record to enable CNAME reuse.
    • Enable CNAME reuse with Sec-Traffic Manager.
      1. In the Select Traffic Scheduling Rule dialog box, select With Sec-Traffic Manager, specify a Sec-Traffic Manager rule, and click OK.Enable CNAME reuse with Sec-Traffic Manager
        If you enable CNAME reuse with Sec-Traffic Manager, the Sec-Traffic Manager rule must be associated with the IP address 1.1.1.1 and the IP address of the Anti-DDoS Premium instance used in the website configuration. If no rule is available, click Create Sec-Traffic Manager Rule to create a rule.
        Note The IP address of the Anti-DDoS Premium instance in the Sec-Traffic Manager rule must be the same as that used in the domain name configuration.
        Sec-Traffic Manager rule
      2. After you specify a Sec-Traffic Manager rule, record the CNAME record of the rule.CNAME reuse
      3. Go to the DNS provider that has the protected domain name and modify the DNS records of all the domain names (a.test, b.test, and c.test) that are hosted on the IP address 1.1.1.1. Use the obtained CNAME record to enable CNAME reuse.
  3. Optional:To add domain names that are hosted by another origin server, perform step 1 and step 2 for this server.

Disable CNAME reuse

You can disable CNAME reuse on the Website Config page.

Notice Before you disable this feature, make sure that the service traffic of all the domain names mapped the CNAME record is no longer rerouted to Anti-DDoS Premium. Otherwise, the inbound traffic cannot be forwarded to the origin server.
  1. Log on to the Anti-DDoS Pro console.
  2. In the top navigation bar, select Outside Mainland China.
  3. In the left-side navigation pane, choose Provisioning > Website Config.
  4. In the target website configuration, disable CNAME Reuse.
  5. Specify whether to retain the website configuration and the Sec-Traffic Manager rule.
    • If you retain a website configuration, the traffic forwarding rules still take effect.
    • If you retain the Sec-Traffic Manager rule, Sec-Traffic Manager still takes effect.