CloudFlare users: how do you manage rules across multiple domains?

I have several domains under my CF account. I have quite detailed caching and WAF rules that I need to apply to all of these domains.

At the moment, the only way I can see to apply these rules to each domain is to manually copy them and to update each one as I make changes over time. This is quite cumbersome, and there’s always a risk I copy the rule incorrectly. Is there a better way to handle this, i.e. writing a cache or firewall rule once, and applying it to several domains?

Anybody else managing multiple domains in their CloudFlare account, how do you keep WAF/cache rules, and other Cloudflare settings, in sync?

2 Comments
  1. It is surprising that no-one’s developed a tool using the CF API tool manage multiple site’s WAF rules. There are dozens of posts in the CF forums about this exact issue.

    I look after around 100 sites – and TBH whilst it’s a minor hassle, using the expression editor to copy rules across to a new zone doesn’t make it too bad. It’s not like I’m doing this a few times a week – I can cope with one or twice a month.

  2. Any rules you set under Security > WAF > Tools are applied to all domains on the account (if you set that option).

    This has been very helpful to whitelist WPMUDEV services like uptime, Snapshot, etc across all our managed domains.

    For caching, as u/bluesix says, you can accomplish this with the API but I’m unaware of any GUI tools to accomplish that. The best way I’ve found to duplicate settings is to switch to the expression editor and copy/paste that as needed

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer