snippetMinor
DNS hosting choices - how to programmatically update DNS settings
Viewed 0 times
settingshostingupdatednshowchoicesprogrammatically
Problem
I manually update the DNS settings at the registrar for my domains, such as
What are people using to automate updates to DNS settings? which registrars have an API ?
Specifically I need to manually update :
-
TXT field for the DKIM setting
-
TXT field for spf
@ TXT 1m "v=spf1 ip4:100.22.22.100 include:blah.com -all"
-
A record everytime I change external IP
To run my own DNS host servers seems like overkill. Ideally I would just make some secure REST call to perform programmatic updates.
https://domains.google.com/registrarWhat are people using to automate updates to DNS settings? which registrars have an API ?
Specifically I need to manually update :
-
TXT field for the DKIM setting
-
TXT field for spf
@ TXT 1m "v=spf1 ip4:100.22.22.100 include:blah.com -all"
-
A record everytime I change external IP
To run my own DNS host servers seems like overkill. Ideally I would just make some secure REST call to perform programmatic updates.
Solution
Amazon web services provides such a service, called Route53. You can actually use REST calls, but it is much easier to use their command line tools or bindings for PHP, Python or JavaScript.
Here is an entry point to get you started, the route53 change resource record sets call can be used to update or insert one or many records on a domain.
https://docs.aws.amazon.com/cli/latest/reference/route53/change-resource-record-sets.html
Of course you need to create an account, set up permissions and delegate name servers to route53.
It's also not free, but fairly cheap at $0.50 for first 25 domains, then $0.10 after. All charges per month.
Here is an entry point to get you started, the route53 change resource record sets call can be used to update or insert one or many records on a domain.
https://docs.aws.amazon.com/cli/latest/reference/route53/change-resource-record-sets.html
Of course you need to create an account, set up permissions and delegate name servers to route53.
It's also not free, but fairly cheap at $0.50 for first 25 domains, then $0.10 after. All charges per month.
Context
StackExchange DevOps Q#4718, answer score: 1
Revisions (0)
No revisions yet.