Automating DNS Record Creation

I have an agency that manages client websites. We are often adding new sites to our account and then adding the same DNS records for each site we add (e.g. DMARC, SPF, MX records). Is there a way I can automate this?

For example, it would be like:

Trigger: New site added
Action: Add DNS records 1-5 with these specific fields for the new site

You could write a script that calls Cloudflare’s API and adds all the records that you need.

1 Like

Best practice is that the clients should have their zone in their own account. This avoids potential mess later on. Clients can grant you access to their account if necessary.

A better option would be to use Cloudflare for SaaS, so that they can use whatever DNS they like, while you manage all settings in relation to their sites from your own account. They just add a few DNS records to permit certificate issuance, and CNAME to your account.

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