---
title: Create a policy in the dashboard · Cloudflare Page Shield docs
description: Learn how to create a Page Shield policy in the Cloudflare dashboard.
lastUpdated: 2025-03-12T18:32:56.000Z
source_url:
  html: https://zt-dark-mode-changelog.preview.developers.cloudflare.com/page-shield/policies/create-dashboard/index.md
  md: https://zt-dark-mode-changelog.preview.developers.cloudflare.com/page-shield/policies/create-dashboard/
---

1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com) and select your account and domain.

2. Go to **Page Shield** > **Policies**.

3. Select **Create policy**.

4. []()

   Enter a descriptive name for the rule in **Description**.

5. Under **If incoming requests match**, define the policy scope. You can use the Expression Builder (specifying one or more values for **Field**, **Operator**, and **Value**) or manually enter an expression using the Expression Editor. For more information, refer to [Edit expressions in the dashboard](https://developers.cloudflare.com/ruleset-engine/rules-language/expressions/edit-expressions/).

6. Under **Allow these directives**, select the desired [CSP directives](https://developers.cloudflare.com/page-shield/policies/csp-directives/) for the policy by enabling one or more checkboxes.

   * To manually enter an allowed source, select **Add source**.

   * To refresh the displayed sources based on Page Shield's detected resources, select **Refresh suggestions**.

     Note

     Page Shield provides suggestions for **Default**, **Scripts**, and **Connections** directives. For the **Default** directive, suggestions are based on monitored scripts and connections resources.

7. Under **Then take action**, select the desired action:

   * *Allow*: Enforces the CSP directives configured in the policy, blocking any other resources from being loaded on your website, and logging any [policy violations](https://developers.cloudflare.com/page-shield/policies/violations/).
   * *Log*: Logs any policy violations without blocking any resources not covered by the policy.

8. To save and deploy your rule, select **Deploy**. If you are not ready to deploy your rule, select **Save as Draft**.
