Using the following, I’m trying to add a wildcard CNAME:
curl -X POST “https://api.digitalocean.com/v2/domains/toggen.com/records” -H ‘Content-Type: application/json’ -H “Authorization: Bearer $TOKEN” -d ‘{“type”:“CNAME”,“name”:“*”,“data”:"’$DOMAIN’."}’
I get back:
{“domain_record”:{“id”:null,“type”:“CNAME”,“name”:null,“data”:“example.com.”,“priority”:null,“port”:null,“weight”:null}}
No record is inserted. I can add other records no problem but it doesn’t seem to like the wildcard character.
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!
Hello,
My only thought is that the $DOMAIN value is not getting parsed in whatever you are using to generate this. I’m currently unable to replicate using the same setup you have and the record is generate each time properly.
I would try removing any values that are generated and try it with all actual values.
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.