Subscribe to receive notifications of new posts:

Today Is A Big Day For Page Rules

2016-04-19

2 min read

Today we're releasing a whole suite of upgrades to page rules: API support, additional settings, pausing a page rule and a mobile-friendly design. Page Rules is the technology that allows you to configure your CloudFlare settings on a per-URL basis. It's often our most powerful feature, enabling CloudFlare domain owners to customize CloudFlare's functionality to exactly match their application's needs.

Announcing API Support For Page Rules

Page Rules are now fully programmable via API.

$ curl -X POST "https://api.cloudflare.com/client/v4/zones/${ZONE_TAG}/pagerules" \
    -H "X-Auth-Email: [email protected]" \
    -H "X-Auth-Key: 000000000000" \
    -H "Content-Type: application/json" \
    --data '{
        "targets":[{
            "target":"url",
            "constraint":{
                    "operator":"matches",
                    "value":"*example.com/images/*"
            }
        }],
        "actions":[{
            "id":"always_online",
            "value":"on"
        }],
        "priority":1,
        "status":"active"
    }'

Starting today, you can script the creation and modification of page rules. You can integrate page rules into your deployment process to bypass caching on every new API endpoint you ship, or to automatically sync your page rules across your domains on CloudFlare. Check out the page rules API docs and get started today. We can't wait to see what automations you build.

13 New Settings Now Available On Page Rules

Instead of the short list of settings you could previously toggle, we've added menus with almost every setting on CloudFlare. You can see the full list of settings now available in page rules here. Moreover, as we introduce features, they will automatically be added to page rules.

Pause A Page Rule

To make debugging page rules easier, we've added a way for you to pause a page rule, temporarily taking it out of production while saving its current configuration. Previously to debug, you'd have to remove a page rule, and then later re-add it from scratch, somehow remembering all of its configuration. Now you can just toggle page rules on and off to take them out of production and reinstate them.

Even when you're initially creating page rules, you can start them off as paused so that you can save your draft and come back later to finish writing the page rule and deploy it.

You can even edit page rules while they are paused, meaning that you can make unlimited changes to a page rule until you choose to finally deploy it into production.

Manage Your Page Rules On The Go

We've removed the old page rules iframe and replaced it with a brand new management panel that not only makes page rules even easier to set up and deploy, it's also perfectly responsive to any device so that you can configure page rules on the go from your phone.

Available Now

We're rolling out support for the new page rules dashboard and API this morning for all CloudFlare customers. If you're a current CloudFlare customer, visit the dashboard to check it out. All of your existing page rules are still intact and unchanged, just presented in a new interface. If you’re not a customer yet and you’re interested in trying this out, you can sign up here.

Cloudflare's connectivity cloud protects entire corporate networks, helps customers build Internet-scale applications efficiently, accelerates any website or Internet application, wards off DDoS attacks, keeps hackers at bay, and can help you on your journey to Zero Trust.

Visit 1.1.1.1 from any device to get started with our free app that makes your Internet faster and safer.

To learn more about our mission to help build a better Internet, start here. If you're looking for a new career direction, check out our open positions.
Page RulesProduct NewsSpeed & ReliabilityAPI

Follow on X

Dani Grant|@thedanigrant
Cloudflare|@cloudflare

Related posts

October 24, 2024 1:00 PM

Durable Objects aren't just durable, they're fast: a 10x speedup for Cloudflare Queues

Learn how we built Cloudflare Queues using our own Developer Platform and how it evolved to a geographically-distributed, horizontally-scalable architecture built on Durable Objects. Our new architecture supports over 10x more throughput and over 3x lower latency compared to the previous version....

October 09, 2024 1:00 PM

Improving platform resilience at Cloudflare through automation

We realized that we need a way to automatically heal our platform from an operations perspective, and designed and built a workflow orchestration platform to provide these self-healing capabilities across our global network. We explore how this has helped us to reduce the impact on our customers due to operational issues, and the rich variety of similar problems it has empowered us to solve....