INTEGRITY Cloudflare Docs

Create a custom rule in the dashboard

  1. In the Cloudflare dashboard, go to the Security rules page.

    Go to Security rules ↗
  2. To create a new empty rule, select Create rule > Custom rules. To duplicate an existing rule, select the three dots next to it > Duplicate.

  3. Enter a descriptive name for the rule in Rule name.

    Custom rule creation page in the Cloudflare dashboard
  4. Under When incoming requests match, use the Field drop-down list to choose an HTTP property. For each request, the value of the property you choose for Field is compared to the value you specify for Value using the operator selected in Operator.

  5. Under Then take action, select the rule action in the Choose action dropdown. For example, selecting Block tells Cloudflare to refuse requests that match the conditions you specified.

  6. (Optional) If you selected the Block action, you can configure a custom response.

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

Configure a custom response for blocked requests

When you select the Block action in a rule you can optionally define a custom response.

The custom response has three settings: