Ensuring that all sites are SSL > Full and Security > Bots are on

I have a ton of sites added to my account now :slight_smile: I did it through API, but I couldn’t find an API to change Security > Bots to on. And after I change the nameservers, they all change the SSL from Full to Flexible so I have to change it back.

I’m pretty sure that I’ve done them all properly, but is there a fast-and-easy way to filter the sites to show any that DON’T have Bots on or that SSL is not set to Full?

You will have to use the API to enumerate your domains, and check the two settings. Depending on what you mean by a ton of sites you might also have to build in some rate limiting into your script.

Get Zone Bot Management Config is documented here.

1 Like

Loop round all the zones and use these endpoints…

https://developers.cloudflare.com/api/operations/zone-settings-get-ssl-setting
https://developers.cloudflare.com/api/operations/bot-management-for-a-zone-get-config

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.