Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
Skip to content
World desk4 min

Cloudflare Page Rules: Setup Steps and Four Useful Examples

Create a Cloudflare Page Rule from Rules > Page Rules, ensure its hostname is proxied, and use these four examples for redirects and cache behavior.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To create a Cloudflare Page Rule, open your domain’s dashboard, go to Rules > Page Rules, choose Create Page Rule, enter a URL pattern, select the setting or action, set its priority, then choose Save and Deploy Page Rule. The matching hostname must have a DNS record proxied through Cloudflare. Page Rules are useful for a few URL-based redirects or cache exceptions, but Cloudflare’s newer Redirects and Cache Rules products may suit new configurations better.

Before you create a Page Rule

  • Confirm the hostname is proxied. The DNS record for the hostname in the rule must be proxied through Cloudflare; a hostname missing from DNS or not routed through Cloudflare will not match in practice. Cloudflare’s Page Rules overview explains the requirement. If a hostname has no real origin, Cloudflare says a proxied placeholder record may still be needed; use a reserved IP address or domain, not infrastructure you do not control. See Manage Page Rules.
  • Plan the URL pattern. Patterns generally follow <SCHEME>://<HOSTNAME>:<PORT>/<PATH>?<QUERY_STRING>. Scheme and port are optional; when omitted, the pattern can match both HTTP and HTTPS and all ports. Pattern details are in Cloudflare’s Page Rules settings reference.
  • Check the zone’s allowance. Cloudflare’s overview, last updated August 14, 2026, lists these default Page Rule quotas:
Cloudflare plan Default Page Rule quota
Free 3
Pro 20
Business 50
Enterprise 125

Disabled rules still count toward the zone’s quota. Plan features and quotas can vary; consult the current Cloudflare Page Rules documentation for your account.

As an Amazon Associate I earn from qualifying purchases.

How to set up a Page Rule

  1. In the Cloudflare dashboard, select the domain you want to configure.
  2. Open Rules > Page Rules, then select Create Page Rule.
  3. Enter the URL or wildcard pattern to match. Make sure it covers only the host and paths that should receive the action.
  4. Choose a setting, and add other settings if needed. A redirect action cannot be combined with setting overrides in the same action set, according to Cloudflare’s Page Rules API documentation.
  5. Set the rule’s order. Only the highest-priority matching Page Rule acts on a request, so put narrower patterns above broader ones.
  6. Choose Save and Deploy Page Rule to activate it, or Save as Draft if you are not ready to deploy.

Cloudflare also supports creating and managing Page Rules through its API; see the Page Rules API reference.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Four useful Page Rule examples

Redirect www to the root domain

For a permanent move from www.example.com to example.com, Cloudflare documents a 301 redirect using the pattern *www.example.com/* and target https://example.com/$2. Substitute your own canonical hostname, then verify the wildcard captures and resulting destination before deployment. Choose a permanent status only if the change is intended to last. Cloudflare’s example is in Page Rules examples.

Make a temporary short link

Cloudflare shows a pattern such as /fb* redirecting to a longer destination with a 302 status. A temporary redirect is appropriate if the source may return or the destination may change; use a permanent status only for a lasting move. See the official Page Rules examples.

Bypass cache on an account or admin path

A documented example matches example.com/user* and sets Cache Level: Bypass. This can be appropriate for personalized or frequently changing content that should be fetched from the origin. Adapt the pattern to your application’s actual private and dynamic routes rather than assuming that every URL beneath a broad path is private. The setting is described in Cloudflare’s settings reference.

Cache a stable asset directory

For a directory containing mostly images and multimedia assets, Cloudflare’s example combines Browser Cache TTL: one day, Cache Level: Cache Everything, and Edge Cache TTL: seven days. These are example values, not universal defaults. Apply them only when the matched content is safe to cache and the origin and application behavior support it. Cloudflare defines Cache Everything as treating all content types as cacheable beyond its default static-file behavior. Its settings reference also warns that Cache Everything combined with an Edge Cache TTL greater than zero removes cookies from the origin response. Review the full behavior and your application’s cache headers before using it on dynamic pages.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Keep rule priority and scope under control

Because only the highest-priority matching Page Rule takes effect, a broad rule can prevent a more specific rule from applying. For example, if a rule matches /images/*, place a rule for /images/special/* above it when the special directory needs different behavior. Keep patterns as narrow as the task allows and check for overlaps whenever you add or reorder rules.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

When to use newer Cloudflare Rules products

Cloudflare describes Page Rules as one way to trigger actions from URL patterns, but recommends considering newer products where they offer a better fit. Its current documentation says these products are available on all plans, with quotas and features depending on plan:

  • Single Redirects: zone-level static or dynamic redirects.
  • Bulk Redirects: larger account-level collections of mostly static redirects.
  • Snippets: more flexible behavior implemented with JavaScript.
  • Cache Rules: cache customization.

See Cloudflare’s guides to URL forwarding and redirects and Cache Rules. Existing Page Rules do not all have to be migrated; check whether each one still provides the behavior you need before adding more.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.