Step 4: Change Domain Name Resolution Records
If your website is connected to cloud WAF, you need to change the domain name resolution record so that DNS can resolve your domain name to the WAF CNAME record. In this way, the traffic passes through WAF. WAF then filters out illegitimate traffic and only routes legitimate traffic back to the origin server. For details, see Table 1.
| Scenario | Parameter Generated | Operation Related to Domain Name Resolution |
|---|---|---|
| No proxies used | CNAME | DNS resolves the domain name to the WAF CNAME record. |
| Proxy used | CNAME, subdomain name, and TXT record |
|
Before a website is connected to WAF, visitors access the website server through a client (such as a browser).
Constraints
- The CNAME record must be unique for the same host record. The existing CNAME record must be changed to the WAF CNAME record.
- Record sets of different types in the same zone may conflict with each other. For example, for the same host record, the CNAME record conflicts with other records such as A record, MX record, and TXT record. If the record type cannot be changed, you can delete the conflicting records and add a CNAME record. Deleting other records and adding a CNAME record should be completed in as short time as possible. If no CNAME record is added after the A record is deleted, domain resolution may fail. For details, see Why Is a Message Indicating Conflict with an Existing Record When I Add a Record Set?
- To prevent other users from configuring your domain name on WAF before you add it to WAF (this will affect WAF protection for your domain name), add the subdomain name and TXT record on your DNS management platform. WAF will determine which user owns the domain name based on the subdomain name and TXT record.
- A modified record set takes effect when the cache duration specified by the TTL of the original record set expires. If the carrier sets a longer cache duration, the record set will take effect after this period of time elapses.
Procedure
Configure a CNAME record for the protected domain name on the DNS platform you use. The following uses Huawei Cloud DNS as an example to show how to change a CNAME record. If the following configuration is inconsistent with the actual configuration, rely on information provided by the DNS providers.
- Click the target domain name to go to the basic information page. In the CNAME row, click
to copy the CNAME record. - Modify the DNS record set.
- Access the DNS resolution page. Figure 1 DNS page
- In the Operation column of the target domain name, click Modify. The Modify Record Set page is displayed.
- In the displayed Modify Record Set dialog box, change the record value.
- Name: Domain name configured in WAF
- Type: Select CNAME-Map one domain to another.
- Line: Default
- TTL (s): The recommended value is 5 min. A larger TTL value will make it slower for synchronization and update of DNS records.
- Value: Change it to the CNAME record copied from WAF.
- Keep other settings unchanged.
About modifying the resolution record:
- The CNAME record must be unique for the same host record. The existing CNAME record must be changed to the WAF CNAME record.
- Record sets of different types in the same zone may conflict with each other. For example, for the same host record, the CNAME record conflicts with other records such as A record, MX record, and TXT record. If the record type cannot be changed, you can delete the conflicting records and add a CNAME record. Deleting other records and adding a CNAME record should be completed in as short time as possible. If no CNAME record is added after the A record is deleted, domain resolution may fail.
- Click OK.
- Access the DNS resolution page.
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot