Manage
You can manage Page Rules in the Cloudflare dashboard or via API.
Consider alternative Rules options due to their enhanced configurability. Refer to the migration guide for details.
For more flexibility and customization, consider using Snippets.
To create a page rule in the dashboard:
-
Log in to the Cloudflare dashboard ↗, and select your account and domain.
-
Go to Rules > Page Rules.
-
Select Create Page Rule.
-
For URL, enter the URL or URL pattern that should match the rule (more details about wildcard matching).
-
For Pick a Setting, select a Cloudflare setting to adjust. If desired, select Add a Setting to adjust multiple Cloudflare settings with the same rule.
-
In the Order dropdown, specify the desired order: First, Last or Custom.
-
To save and deploy your rule, select Save and Deploy Page Rule. If you are not ready to deploy your rule, select Save as Draft.
If you are matching a hostname in your rule expression, you may be prompted to create a proxied DNS record for that hostname. Refer to Troubleshooting for more information.
For ideas about what rules you can create, refer to recommended rules.
To create a page rule using the API, send a POST
request.
You may also want to review the documentation on wildcard matching, available settings, and recommended rules.
To edit a page rule in the dashboard:
-
Log in to the Cloudflare dashboard ↗, and select your account and domain.
-
Go to Rules > Page Rules.
-
For a specific rule:
- To enable or disable the rule, select the on/off toggle.
- To modify the URL pattern, settings, and order, select Edit (wrench icon). Then, enter the information you want to change.
To update one or more fields using the API, send a PATCH
request.
To entirely replace the configuration of a page rule, send a PUT
request.
To delete a page rule in the dashboard:
- Log in to the Cloudflare dashboard ↗, and select your account and domain.
- Go to Rules > Page Rules.
- For a specific rule, select X. Then, select Delete.
To delete a page rule using the API, send a DELETE
request.
Was this helpful?
- Resources
- API
- New to Cloudflare?
- Products
- Sponsorships
- Open Source
- Support
- Help Center
- System Status
- Compliance
- GDPR
- Company
- cloudflare.com
- Our team
- Careers
- © 2025 Cloudflare, Inc.
- Privacy Policy
- Terms of Use
- Report Security Issues
- Trademark