Updated on 2024-03-14 GMT+08:00

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

After you connect a domain name or IP address of the website you want to protect to WAF, 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.

WAF offers the cloud and dedicated modes to protect websites. You can add either domain names or IP addresses to WAF. Before you start, get familiar with the following differences:
  • Cloud mode: protects your web applications on or off the cloud through domain names.
  • Dedicated mode: protects your web applications on the cloud through 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.
  • 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.

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