After adding a domain name in Anti-DDoS Proxy, point it to the CNAME or IP address provided by the service to reroute website traffic through the Anti-DDoS Proxy instance for protection. This topic uses Alibaba Cloud DNS (Free Edition) as an example.
Onboarding methods
Two onboarding methods are available. We recommend the CNAME method. Use the A record method only if CNAME records are not supported or conflict with other records.
-
Method 1: CNAME record (Recommended)
Point your domain name's DNS record to the CNAME address provided by Anti-DDoS Proxy. You only need to configure this once. If the associated Anti-DDoS Proxy IP addresses change, no record update is needed — Anti-DDoS Proxy automatically manages traffic scheduling through the CNAME. If your website is associated with multiple Anti-DDoS Proxy IP addresses, traffic is automatically switched between them.
-
Method 2: A record
Point your domain name's DNS record to the associated Anti-DDoS Proxy IP address. If the IP address changes, you must manually update the record. If your website is associated with multiple Anti-DDoS Proxy IP addresses, you must manually switch between them.
Notes
The DNS record value must match the CNAME address or Anti-DDoS Proxy IP address specified in the domain onboarding configuration. Otherwise, traffic forwarding fails.
Prerequisites
-
You have added your website to Anti-DDoS Proxy. For more information, see Add Website Configurations.
-
You have added the back-to-origin IP addresses of Anti-DDoS Proxy to the allowlist of your origin server. If you have non-Alibaba Cloud security software, such as a third-party firewall, on your origin server, add the back-to-origin IP addresses of Anti-DDoS Proxy to the software's allowlist to prevent it from blocking back-to-origin traffic. For more information, see Allow Back-to-Origin IP Addresses.
-
You have verified that the forwarding rules are in effect. We strongly recommend verifying the forwarding rules of your Anti-DDoS Proxy instance locally before switching your website traffic. For more information, see Verify Forwarding Rules Locally.
WarningIf you switch your traffic before the forwarding rules take effect, your services may be interrupted.
Procedure
The following procedure uses a domain name hosted on Alibaba Cloud DNS as an example. The steps may vary if you use a different DNS provider.
-
Log on to the Alibaba Cloud DNS console.
-
On the Domain Statistics page, find the target domain name and click Actions in the Settings column.
-
On the Settings page, find the DNS record that you want to modify and click Actions in the Edit column.
NoteIf the record does not exist, click Add Record.
-
On the Modify Record (or Add Record) page, select an onboarding method and modify the DNS record.
-
(Recommended) CNAME record: Set Record Type to CNAME, and set Record Value to the domain name's Anti-DDoS Proxy CNAME address.
-
A record: Set Record Type to A, and set Record Value to the domain name's associated Anti-DDoS Proxy IP address.
NoteYou can find your domain name's CNAME address and associated Anti-DDoS Proxy IP address on the page in the Anti-DDoS Proxy console.
-
-
Click OK and wait for the new DNS settings to take effect.
-
Verify that your website is accessible from a browser.
If you encounter issues with website access, see What do I do if I experience stuttering, latency, or connection errors after I onboard services to Anti-DDoS Proxy?.
Related operations
After onboarding your services to Anti-DDoS Proxy, consider the following tasks:
-
Enable Traffic Scheduler to configure interaction rules between Anti-DDoS Proxy and other cloud resources, activating Anti-DDoS Proxy only in specific scenarios. For more information, see Traffic Scheduler overview.
-
Change the public IP address of an origin ECS instance. If your origin server's IP address is exposed, attackers can bypass Anti-DDoS Proxy and directly attack the origin server. You can use Anti-DDoS Proxy to change the public IP address of the origin ECS instance. For more information, see Change Origin ECS Public IP.
FAQ
How do I configure DNS if my domain name uses both CDN and Anti-DDoS Proxy?