You can deploy Alibaba Cloud WAF and CDN (Content Delivery Network) together to speed up your website and protect against web attacks at the same time. We recommend that you use the following architecture: CDN (entry layer, website speed up) > WAF (intermediate layer, web attacks protection) > Origin.
- See Get started with Alibaba Cloud CDN to implement a CDN for your domain name.
- Create a website configuration in Alibaba Cloud WAF.
- Domain name: Enter the CDN-enabled domain name. Wildcard is supported.
- Server address: Enter the public IP address of the ECS/Server Load Balancer instance, or the external server IP address of the origin server.
- Any layer 7 proxy (e.g. Anti-DDoS/CDN) enabled?: Check yes.
- When the website configuration is successfully created, WAF generates a dedicated CNAME address for it.
Note For more information about how to view the WAF CNAME address, see WAF deployment guide.
- Modify the CDN configuration to change the origin site address to the WAF CNAME address.
- Log on to the Alibaba Cloud CDN console.
- Go to the Domain Names page, select the domain to be configured, and click Configure.
- Under Origin site settings, click Modify.
- Modify origin site information.
- Type: Select Origin Site.
- Origin site address IP: Enter the WAF CNAME address.
- Use the same protocol as the back-to-source protocol: Select Enable.
- Under Back-to-Source Settings, make sure that Back-to-Source host is disabled.