Step 1: Add a Website Domain Name to WAF
- A protected domain name can only be added to cloud WAF once.
- If a domain name uses different ports, each combination of the domain name plus a port is a unique protected object.
For example, www.example.com:8080 and www.example.com:8081 are two different protection objects and are both counted toward object 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.
- 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).
| Parameter | Option | Description | Example Value |
|---|---|---|---|
| Protected Domain Name | - | The domain name is used by visitors to access your website. A domain name consists of letters separated by dots (.). It is a human readable address that maps to the machine readable IP address of your server. |
|
| Protected Port | - | The service port corresponding to the domain name of the website you want to protect.
| 80 |
| Server Configuration | Client Protocol | Protocol used by a client (for example, a browser) to access the website. WAF supports HTTP and HTTPS. | HTTP |
| Server Protocol | Protocol used by WAF to forward requests from the client (such as a browser). The options are HTTP and HTTPS. | HTTP | |
| Server Address | A client (such as a browser) accesses the public IP address (or domain name) of the origin server where the website is located. Generally, the domain name corresponds to the CNAME configured by the DNS service provider. | XXX.XXX.1.1 | |
| Server Port | Port used by WAF to forward client requests to the server | 80 | |
| (Optional) Certificate | - | If you set Client Protocol to HTTPS, you are required to configure a certificate on WAF and associate the certificate with the domain name. NOTICE:
| - |
| Use Layer-7 Proxy | - | Check whether a proxy, such as CDN or advanced anti-DDoS, is used for the domain name before the domain name is added to WAF. NOTICE:
| - |
- Configuration for port 80/443
- Protected Port: Select Standard port.
- Client Protocol
- Protection for port 80: Select HTTP.
- Protection for port 443: Select HTTPS.
- Protection for both ports 80 and 443: Configure two pieces of server information and set Client Protocol to HTTP and HTTPS, respectively, as shown in Figure 1.
- In Figure 1, the parameter settings in the red box are fixed. Set other parameters based on site requirements.
- In this case, your website visitors can access the website without adding a port to the end of the domain name. For example, they can enter http://www.example.com in the address box of the browser to access the website.
- Forwarding client requests to different origin servers
Configuration scenario: Using WAF to distribute client requests for the same protected object across different origin servers.
For example, you want to add domain name www.example.com and port 8080 to WAF, and want to let WAF forward client requests to two backend servers.
- Domain Name: www.example.com
- Protected Port: 8080
- Client Protocol: WAF auto-fills the client protocol based on the protected port you select. Only HTTP supports port 8080. So, Client Protocol must be to HTTP for the two pieces of origin server information. Figure 2 shows an example.
- In Figure 2, the parameter settings in the red box are fixed. Set other parameters based on site requirements.
- In this scenario, visitors need to add a port number to the end of the domain name when they try to access the website. Otherwise, error 404 will be reported. For example, they need to enter http://www.example.com:8080 in the address box of the browser to access the website.
- Protection for one domain name with different protected ports
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.
WAF provides various protocol types. Take www.example.com as an example. WAF supports the following four forwarding methods:
- In HTTP forwarding mode, set both Client Protocol and Server Protocol to HTTP, as shown in Figure 3. In this scenario, the client accesses the website over HTTP, and WAF forwards requests to the origin server over HTTP. So, this mode is suitable when encrypted transmission is not required.
- In Figure 3, the parameter settings in the red box are fixed. Set other parameters based on site requirements.
- This configuration allows web visitors to access the website over HTTP only. If they access it over HTTPS, they will receive the 302 Found code and be redirected to http://www.example.com.
- In HTTPS forwarding, HTTPS is set to Client Protocol and Server Protocol, as shown in Figure 4. This configuration allows web visitors to access your website over HTTPS only. If they access over HTTP, they are redirected to https://www.example.com. In this scenario, the client accesses the website over HTTPS, and WAF forwards requests to the origin server over HTTPS as well. So, this mode is suitable when encrypted transmission is required.
- In Figure 4, the parameter settings in the red box are fixed. Set other parameters based on site requirements.
- If visitors access your website over HTTPS, the website returns a successful response.
- If visitors access your website over HTTP, they will receive the 301 Found code and are directed to https://www.example.com.
- In HTTP and HTTPS forwarding, configure two pieces of server configurations, one with Client Protocol and Server Protocol set to HTTP, and the other with Client Protocol and Server Protocol set to HTTPS, as shown in Figure 5. This configuration applies only to protection for standard ports 80 and 443.
- In Figure 5, the parameter settings in the red box are fixed. Set other parameters based on site requirements.
- If visitors access your website over HTTP, the website returns a successful response. Communications between the browser and website are not encrypted.
- If visitors access your website over HTTPS, the website returns a successful response and all communications between the browser and website are encrypted.
- If you want to use WAF for HTTPS offloading, select HTTPS for Client Protocol and HTTP for Server Protocol, as shown in Figure 6. In this scenario, when a client accesses a website, HTTPS is used for encrypted transmission, and WAF uses HTTP to forward requests to the origin server.
- In Figure 6, the parameter settings in the red box are fixed. Set other parameters based on site requirements.
- If visitors access your website over HTTPS, WAF forwards the requests to your origin server over HTTP.
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





