Duplicate / copy page rules and firewall rules to other domains in account

I set up quite a few domains in Cloudflare regularly, they mostly need all the same settings, page rules, firewall rules etc.

I would really like to see a feature to copy this kind of thing to another domain in your account so you don’t have to keep creating them for each domain! Would especially Iike to see this feature for page rules and firewall rules :slightly_smiling_face:

+1 This could be also available like the IP Access Rules, where users can add the rule and chose to apply it to “This domain” or “All websites in account”. Makes it a lot easier to update and maintain rules for multiple domains.

8 Likes

The big issue is the possibility of error because I have to hand copy this so many times.

I’ve setup 5 websites so far (2 business, 3 pro) with 6 identical rules except for the domain. I have another 4 (business level) websites to go. This is brutal.

1 Like

Have tried using terraform with Cloudflare?

2 Likes

I ran across this thread looking to copy/paste firewall rules to more than a dozen domains. Found a way that wasn’t mentioned above, but it sure made copy/paste those Cloudflare firewall rules easier… not completely automated, but simple: https://www.virtuallabrats.com/blog/how-to-copy-cloudflares-firewall-rules-without-terraform-or-anything-else/

That tip for using the Expression editor is nice, but I’ll add a +1 for floripare’s suggestion that it could be like IP Access Rules, where a single rule could be applied to multiple domains at once.

2 Likes

+1. In my case I am moving domains, and have lots of configuration that needs to be duplicated. Would love the ability to simply export a domain’s configuration all the way down, from dns, to firewall, to page rules.

3 Likes

I could swear that we used to have the ability to set a firewall rule to apply to all sites in your account years back.

Ahh you can. In tools. You can set an IP to be blocked or whitelisted over your entire account.

Not “Firewall Rules” per se, but the IP Access List in Firewall → Tools can be applied across the entire account.

2 Likes

So, if i have let’s say 10 domains on my Cloudflare account and added 3 different firewall rules that now need to be added to all 10 domains, i wish there was an account wide “use account settings for rules list” that i could just apply and manage the list on the account level.

example idea (can’t upload a 2nd image because new users can only embed 1 media):
https://i.imgur.com/ANnatbI.png

I know the “rules lists” itself is already, but as you can see below, it is only specific to those 2 options, none of the others, it gets really annoying when you have many more rules.

This feedback has no priority so it’s ok if we only get this down the line someday :slight_smile:

1 Like

is there any update on this. I would like to just use the same rules across all the sites on Cloudflare under my account. this should be easy

I have over 200 low-traffic domains so you can imagine it is not practical to do this manually. I ended up writing a UI that uses the Cloudflare API to loop through each domain, setting the same WAF rule to each.

Like others have said, being able to write a WAF rule expression once and have it apply to all would be great.

1 Like

+1 :slight_smile: Yes please. This feature would save us SO MUCH TIME.

+1 from me as well, I would love to be able to copy/paste a page rule across multiple websites in the same account, or even have the ability to add one rule that can apply “across account” similar to the WAF > Tools. Failing that, a simple ability to copy an expression (similar to the WAF > Custom rules)

In my case, this would quickly allow me to add an Let’s Encrypt exception rule to many websites.

1 Like