Question
How to add wildcard CNAME with api?
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.
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×