Updated on 2024-02-01 GMT+08:00

How Do I Add a Domain Name/IP Address to WAF?

In cloud CNAME mode or dedicated mode, WAF works as a reverse proxy between the client and the server. The real IP address of the server is hidden and only the IP address of WAF is visible to web visitors.

In cloud-load balancer mode, WAF extracts website traffic through the SDK embedded in the gateway of the load balancer for inspection. The load balancer determines whether to forward client requests to the origin server based on the WAF inspection result. In this method, WAF does not forward traffic. This reduces compatibility and stability problems.

When adding a website to WAF, you can select Cloud - CNAME, Cloud - Load balancer, or Dedicated for Protection. Before you start, get familiar with the following differences:
  • Cloud - CNAME: protects your web applications that have domain name and are deployed on any clouds or in on-premises data centers.
  • Cloud - Load balancer: protects your web applications that are deployed on Huawei Cloud and accessible over domain names or IP addresses.
  • Dedicated: protects your web applications that are deployed on Huawei Cloud and accessible over domain names or IP addresses.
  • You can enter a multi-level single domain name (for example, top-level domain name example.com or second-level domain name www.example.com) or a wildcard domain name (*.example.com). The processes of connecting domain names to different WAF instance types are the same.
    • If the server IP address of each subdomain name is the same, enter a wildcard domain name. For example, if the subdomain names a.example.com, b.example.com, and c.example.com have the same server IP address, you can add the wildcard domain name *.example.com to WAF to protect all three.
    • If the server IP addresses of subdomain names are different, add subdomain names as single domain names one by one.
  • A domain name cannot be added to WAF cloud mode repeatedly.

    Each combination of a domain name and a non-standard port is counted towards the domain name quota of the WAF edition you are using. For example, www.example.com:8080 and www.example.com:8081 use two domain names of the quota. If you want to protect web services over multiple ports with the same domain name, add the domain name and each port to WAF.

For details, see Edition Differences.

The following figure shows the process of connecting a website to WAF in each mode.

Figure 1 Process of connecting a website to WAF - Cloud Mode (CNAME Access)
Figure 2 Process of connecting a website to a dedicated WAF instance

For more details, see Adding a Domain Name to WAF.

Domain Name and Port Configuration FAQs

more