Bulk DNS changes for multiple DNS?
Hi! I have a situation that requires me to set up multiuple redirects for several domains I own. Its quite exhaustive to go to each domain and add the records I need. Is there a feature to change DNS settings en-mas for domains?
13 Replies
You can use the API to create redirects or DNS records.
Would you happen to know of a support doc that specifies the particulars of that? Have not worked with their api before.
What exactly do you need to do?
I have 10 domains I need to redirect to another domain, just tedious to set all of them up manually
So you need to create the redirect rules. Do you also need to create proxied DNS records?
Yes
Cloudflare API | DNS › Records › Create DNS Record
Interact with Cloudflare's products and services via the Cloudflare API
For the redirect rules, if it's a one time thing you're probably a lot faster if you just create them manually.
The DNS records will also be created automatically.
Ok cool, ill stow this away in my bookmarks
Ty!
Cloudflare Docs
Create a redirect rule via API
Use the Rulesets API to create a redirect rule via API.
Think anyone would find a python script to do this useful?
https://github.com/trueheads/cloudflare-bulk-redirect/tree/main
threw together a script and put it on github. @Laudian are you able to mark as resolved?
GitHub
GitHub - trueheads/cloudflare-bulk-redirect
Contribute to trueheads/cloudflare-bulk-redirect development by creating an account on GitHub.
@Laudian Figured id learn ya real quick. CF has a bulk redirects feature now lo and behold.
