After a domain name is connected to WAF, WAF functions as a reverse proxy between the client and server. The real IP address of the server is hidden, and only the IP address of WAF is visible to web visitors. You must point the DNS resolution of the domain name to the CNAME record provided by WAF. In this way, access requests can be resolved to WAF.
To ensure that your WAF instance works properly, test it according to the instructions in Step 3: Test WAF before routing your business traffic to WAF.
DNS resolves your domain name to the origin server IP address before the website is connected to WAF. DNS resolves your domain name to the CNAME of WAF after the website is connected to WAF. Then WAF inspects the incoming traffic and filters out malicious traffic.
If a proxy such as anti-DDoS service is used on your website before it is connected to WAF, DNS resolves the website domain name to the anti-DDoS IP address. The traffic goes to the anti-DDoS service and the anti-DDoS service then routes the traffic back to the origin server. After you connect your website to WAF, change the back-to-source address of the proxy (such as anti-DDoS service) to the CNAME of WAF. In this way, the proxy forwards the traffic to WAF. WAF then filters out illegitimate traffic and only routes legitimate traffic back to the origin server.
in the upper left corner of the management console and select a region or project.
in the upper left corner and choose .
to copy the CNAME record.Configure the CNAME record at your DNS provider. For details, contact your DNS provider.
Change the back-to-source IP address of the used proxy, such as anti-DDoS and CDN services, to the copied CNAME record.
To prevent other users from configuring your domain names on WAF in advance (this will cause interference on your domain name protection), add the subdomain name and TXT record on your DNS management platform.
WAF determines which user owns the domain name based on the configured Subdomain Name and TXT Record.
If the configured CNAME is returned, the configuration is successful.
Example command:
nslookup www.example.com