Modifying the Alarm Page

If a visitor is blocked by WAF, the Default block page of WAF is returned by default. You can also configure Custom or Redirection for the block page to be returned as required.

If you have enabled enterprise projects, you can select your enterprise project from the Enterprise Project drop-down list and customize alarm pages for the domain names in the project.

Prerequisites

A website has been added to WAF.

Constraints

  • The content of the text/html, text/xml, and application/json pages can be configured on the Custom block page to be returned.
  • The root domain name of the redirection address must be the same as the currently protected domain name (including a wildcard domain name). For example, if the protected domain name is www.example.com and the port is 8080, the redirection URL can be set to http://www.example.com:8080/error.html.

    The Redirection mode is not supported if you select ELB mode for the protected website.

Procedure

  1. Log in to the management console.
  2. Go to the Website Settings page by following the steps shown in Figure 1.

    Figure 1 Accessing to the Website Settings page

  3. In the Protected Website column, click the domain name of the website to go to the basic information page.
  4. Click next to the page template name in the row where Alarm Page is located. In the displayed Alarm Page dialog box, specify Page Template.

    • To use the built-in page, select Default. An HTTP code 418 is returned.
      Figure 2 Default alarm page
    • To customize the alarm page, select Custom and configure following parameters. Figure 3 shows an example.
      • HTTP Return Code: return code configured on a custom page.
      • Block Page Type: The options are text/html, text/xml, and application/json.
      • Page Content: Configure the page content based on the selected value for Block Page Type.
      Figure 3 Custom alarm page
    • To configure a redirection URL, select Redirection.
      Figure 4 Redirection alarm page

      The root domain name of the redirection URL must be the same as the currently protected domain name (including a wildcard domain name). For example, if the protected domain name is www.example.com and the port number is 8080, the redirection URL can be set to http://www.example.com:8080/error.html.

  5. Click OK.