Manage Page Rules

Last updated Apr 16, 2026 You can manage Page Rules in the Cloudflare dashboard or via API.

Note

Consider alternative Rules options due to their enhanced configurability. Refer to the migration guide for details.

For more flexibility and customization, consider using Snippets.

Create a page rule

To create a page rule in the dashboard:

  1. In the Cloudflare dashboard, go to the Page Rules page. Go to Page Rules ↗
  2. Select Create Page Rule.
  3. For URL, enter the URL or URL pattern that should match the rule (more details about wildcard matching).
  4. 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.
  5. In the Order dropdown, specify the desired order: First, Last or Custom.
  6. 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 page 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.

Notes

  • Page Rules require a proxied DNS record to work. Page Rules will not apply to subdomains that do not exist in DNS or are not being directed to Cloudflare.
  • Cloudflare does not support non-ASCII characters — such as punycode/unicode domain — in Page Rules. Instead, you could URL-encode the string using Punycode converter ↗︎.

Edit a page rule

To edit a page rule in the dashboard:

  1. In the Cloudflare dashboard, go to the Page Rules page. Go to Page Rules ↗
  2. For a specific rule:
  3. To enable or disable the rule, select the on/off toggle.
  4. 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.

Delete a page rule

To delete a page rule in the dashboard:

  1. In the Cloudflare dashboard, go to the Page Rules page. Go to Page Rules ↗
  2. For a specific rule, select X. Then, select Delete.

To delete a page rule using the API, send a DELETE request.

Was this helpful?

YesNo

On this page

Manage Page Rules - 图1Docs

{"@context":"https://schema.org","@type":"TechArticle","@id":"https://developers.cloudflare.com/rules/page-rules/manage/#page","headline":"Manage Page Rules","description":"Create, edit, and manage Page Rules in the dashboard.","url":"https://developers.cloudflare.com/rules/page-rules/manage/","inLanguage":"en","image":"https://developers.cloudflare.com/rules/page-rules/manage/og.png?v=1dc5f72f1baecb51","dateModified":"2026-04-16","publisher":{"@type":"Organization","name":"Cloudflare","description":"One platform for your apps, agents, and workforce. Build, secure, and scale without managing infrastructure","url":"https://www.cloudflare.com/","sameAs":["https://github.com/cloudflare","https://www.linkedin.com/company/cloudflare","https://x.com/cloudflare"],"logo":{"@type":"ImageObject","url":"https://developers.cloudflare.com/logo.svg"},"address":{"@type":"PostalAddress","streetAddress":"101 Townsend St","addressLocality":"San Francisco","addressRegion":"CA","postalCode":"94107","addressCountry":"US"},"contactPoint":[{"@type":"ContactPoint","contactType":"Customer Support","url":"https://support.cloudflare.com/","availableLanguage":["English"]},{"@type":"ContactPoint","contactType":"Sales","url":"https://www.cloudflare.com/contact/","availableLanguage":["English"]}]},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"}}


description: Additional reference information for Page Rules settings. title: Additional reference for Page Rules image: https://developers.cloudflare.com/rules/page-rules/reference/additional-reference/og.png?v=aa4006348b85d063


Skip to content

Documentation Index
Fetch the complete documentation index at: https://developers.cloudflare.com/rules/llms.txt
Use this file to discover all available pages before exploring further.