I have my domain’s name servers set to be DO’s name servers. I can successfully manually add/delete records in the DO control panel, but it would be super-cool & useful for the droplets to “auto-register” themselves (create A records) in DNS for a given domain (simple for me, I only have one, but I can see folks having multiple ones) and auto-remove themselves when I destroy the droplets. I have been doing rapid prototyping and am creating sets of droplets, using them for a few minutes, and then destroying them. Each time I create a round I have to go in and re-set the DNS A rec’s for the new droplets (they tend to get the same IP addresses, but the IP mappings change between droplets that are named the same as the last round…) Is auto-mapping available today (thru the UI) or if not, is it possible thru the API (I guess I’d have to write a program to do the mapping/unmapping when I create/destroy respectively…)
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
It most certainly is possible to do this through the API. I would suggest downloading a wrapper for your language of choice, or even just execue a cURL request, and then adding the DNS modifications you like to be completed during your create/destroy process.
See: https://developers.digitalocean.com/documentation/v2/#create-a-new-domain-record
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.