Updated on 2025-10-20 GMT+08:00

Creating a Protection Policy

A protection policy is a collection of multiple protection rules. You can configure and manage protection rules in a policy. After a website is connected to WAF, a default protection policy is generated for the website domain name. You can configure protection rules for the policy as needed. You can configure protection rules in the default policy, or create a policy and configure protection rules for specific attack scenarios.

Constraints

A protected website domain name can use only one policy.

Adding a Protection Policy

  1. Log in to the WAF console.
  2. Click in the upper left corner and select a region or project.
  3. (Optional) If you have enabled the enterprise project function, in the upper part of the navigation pane on the left, select your enterprise project from the Filter by enterprise project drop-down list. Then, WAF will display the related security data in the enterprise project on the page.
  4. In the navigation pane on the left, click Policies.
  5. On the My Policies tab, click Add Policy.
  6. In the Add Policy dialog box, enter a policy name and click Confirm.

    Figure 1 Add Policy

    After completing the preceding configuration, you can view the added policy in the policy list. Click the policy name. On the policy details page, configure protection rules by referring to Configuring Protection Rules.

Copying a Protection Policy

You can copy policies in the same enterprise project.

  1. Log in to the WAF console.
  2. Click in the upper left corner and select a region or project.
  3. (Optional) If you have enabled the enterprise project function, in the upper part of the navigation pane on the left, select your enterprise project from the Filter by enterprise project drop-down list. Then, WAF will display the related security data in the enterprise project on the page.
  4. In the navigation pane on the left, click Policies.
  5. Locate the row containing the policy you want to copy. In the Operation column, click More > Copy.
  6. In the Copy Policy dialog box, confirm the new policy name and enterprise project, and click Confirm.

Related Operations

  • Renaming a policy: Click next to the target policy name. In the dialog box displayed, enter a new policy name.
  • Deleting a policy: Locate the row that contains the target policy, click More > Delete in the Operation column.

    If a policy is applied to a domain name, remove the domain name from the policy. Otherwise, the policy cannot be deleted.

  • Deleting policies in batches: Select the policies to be deleted and click Delete above the policy list.