Create Custom Firewall rules in the dashboard
Create Custom Firewall rules under the Custom Rules tab in the Firewall app.
Create a Custom Firewall rule
To create a new Custom Firewall rule:
Log in to the Cloudflare dashboard.
Select the Websites tab and choose the site for which you want to create a rule.
Navigate to Firewall > Custom Rules.
Click Create Custom rule > Firewall rule.
In the page that displays, enter a descriptive name for the rule in Rule name.
Under If 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.
Select the rule action from the Choose action drop-down list. For example, selecting Block tells Cloudflare to refuse requests that match the conditions you specified.
To save and deploy your rule, click Save and Deploy. If you are not ready to deploy your rule, click Save as Draft.