All Products
Search
Document Center

Web Application Firewall:Improve web protection with custom rule groups

Last Updated:Mar 31, 2026

When the RegEx Protection Engine in WAF blocks legitimate requests to your website, you can create a custom rule group to exclude the specific protection rule causing the false positive—without disabling your overall protection.

Prerequisites

Before you begin, ensure that you have:

  • A WAF instance purchased with the subscription billing method

    • If the instance is deployed in the Chinese Mainland: Business edition or higher

    • If the instance is deployed outside the Chinese Mainland: Enterprise edition or higher

  • Your website added to WAF. For more information, see Tutorials

How it works

The custom rule group approach lets you selectively remove one problematic rule without touching your base protection configuration:

  1. Identify the rule ID that is triggering false positives.

  2. Copy the active rule group to create a custom version.

  3. Remove the problematic rule from the custom rule group.

  4. Apply the custom rule group to only the affected domain name.

Resolve false positives caused by the RegEx Protection Engine

Step 1: Find the rule ID

  1. Log on to the WAF console.

  2. In the top navigation bar, select the resource group and the region of your WAF instance. The region can be Chinese Mainland or Outside Chinese Mainland.

  3. In the left-side navigation pane, choose Security Operations > Security Report.

  4. On the Web Security tab, click Web Intrusion Prevention, select the affected domain name, and then select Regular Protection in the lower part of the page to view attack records.

    Attack records showing the rule ID that causes false positives

  5. In the attack record list, locate the false positive record and note the rule ID. To find the record faster, search by the attack IP address.

Step 2: Create a custom rule group

  1. In the left-side navigation pane, choose System Management > Protection Rule Group.

  2. On the Web Application Protection tab, find the rule group that applies to the affected domain name. Search by domain name in the Website column.

    Website column in the rule group list

  3. In the Action column, click Copy.

  4. On the Copy Rule Group page, enter a descriptive name in the Rule Group Name field (for example, medium rule group-remove false positive rule), turn on Automatic Update, and click Save. The new rule group appears in the rule group list.

    Copy Rule Group page

    Rule group list after copying

Step 3: Remove the false positive rule

  1. In the rule group list, find the custom rule group you just created. In the Action column, click Edit.

  2. On the Edit Rule Group page, search for the rule using the rule ID you recorded earlier. Select the rule and click Remove Selected Rules.

    Important

    Before removing a rule, verify that you have selected the exact rule that is blocking normal requests.

    Edit Rule Group page

  3. Click Save.

Step 4: Apply the custom rule group to your website

  1. In the rule group list, find the custom rule group. In the Action column, click Apply to Website.

  2. On the Apply to Website page, add the affected domain name to the Websites Added to WAF section and click Save.

    Apply to Website page

Verify the result

After applying the custom rule group, go to the Website Protection page and check the RegEx Protection Engine settings. The Protection Rule Group field should now show the custom rule group you applied.

Website Protection page showing the custom rule group

Send the same request that was previously blocked. WAF should now allow it through.

Note

If requests are still blocked, double-check that you identified the correct rule ID and that the exact rule was removed from the custom rule group. For more information about RegEx Protection Engine settings, see Configure the protection rules engine feature.