DNS Resolution
Description
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.
Procedure
- Click
to copy the CNAME record of WAF.
- Modify DNS record for the domain name.
- No proxy used
Configure the CNAME record at your DNS provider. For details, contact your DNS provider.
The following uses Huawei Cloud DNS as an example to show how to configure a CNAME record. If the following configuration is inconsistent with your configuration, use information provided by the DNS providers.
- Click
in the upper left corner of the page and choose Networking > Domain Name Service.
- In the navigation pane on the left, choose Public Zones.
- In the Operation column of the target domain name, click Manage Record Set. The Record Sets tab page is displayed.
- In the row containing the desired record set, click Modify in the Operation column.
- 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: Select 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. You need to change the existing CNAME record of your domain name to 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 directly 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 about the restrictions on domain name resolution types, see Why Is a Message Indicating Conflict with an Existing Record Set Displayed When I Add a Record Set?
- Click OK.
- Click
- Proxy used
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.
- Obtain Subdomain Name and TXT Record: In the row of Access Status, click How to Access. In the Access Guide dialog box, copy Subdomain Name and TXT Record.
- Obtain the subdomain name and TXT record: On the top of the domain name basic information page, click
next to Inaccessible. In the dialog box displayed, copy the subdomain name and TXT record.
- Add Subdomain Name at the DNS provider and configure TXT Record for the subdomain name. For details about the configuration method, see What Are Impacts If No Subdomain Name and TXT Record Are Configured?
WAF determines which user owns the domain name based on the configured Subdomain Name and TXT Record.
- No proxy used
- Verify that the CNAME of the domain name has been configured.
- In Windows, choose Start > Run. Then enter cmd and press Enter.
- Run a nslookup command to query the CNAME record.
If the configured CNAME is returned, the configuration is successful. An example command response is displayed in Figure 1.
If the configured CNAME is returned, the configuration is successful.
Using www.example.com as an example, the output is as follows:
nslookup www.example.com
- After the preceding steps are complete, select Finished.
Feedback
Was this page helpful?
Provide feedbackThank 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