Example for GoDaddy API removes any TXT records you might already have #251

Closed
opened 2025-12-29 01:20:19 +01:00 by adam · 3 comments
Owner

Originally created by @flamingm0e on GitHub (Sep 8, 2017).

Had this hit us a couple of times now. Finally tracked it down to the GoDaddy API call in the example.
The example included will automatically remove any TXT records you have in your DNS manager.

https://github.com/lukas2511/dehydrated/wiki/Example-of-DNS-01-via-GoDaddy-API

curl -X PUT https://api.godaddy.com/v1/domains/$domain/records/TXT -H "Authorization: sso-key $apikey:$secret" -H "Content-Type: application/json" -d "[{\"name\": \"_acme-challenge.${2}\", \"ttl\": 600, \"data\": \"${4}\"}]"

The documentation lists another option.
https://developer.godaddy.com/doc#!/_v1_domains

/v1/domains/{domain}/records/{type}/{name}

I fixed this for my needs by changing the line to:
curl -X PUT https://api.godaddy.com/v1/domains/$domain/records/TXT/_acme-challenge.${2} -H "Authorization: sso-key $apikey:$secret" -H "Content-Type: application/json" -d "[{\"name\": \"_acme-challenge.${2}\", \"ttl\": 600, \"data\": \"${4}\"}]"

A disclaimer in the Wiki for this example would be a nice to have. It removed my SPF records twice now.

Originally created by @flamingm0e on GitHub (Sep 8, 2017). Had this hit us a couple of times now. Finally tracked it down to the GoDaddy API call in the example. The example included will automatically remove any TXT records you have in your DNS manager. https://github.com/lukas2511/dehydrated/wiki/Example-of-DNS-01-via-GoDaddy-API `curl -X PUT https://api.godaddy.com/v1/domains/$domain/records/TXT -H "Authorization: sso-key $apikey:$secret" -H "Content-Type: application/json" -d "[{\"name\": \"_acme-challenge.${2}\", \"ttl\": 600, \"data\": \"${4}\"}]"` The documentation lists another option. https://developer.godaddy.com/doc#!/_v1_domains `/v1/domains/{domain}/records/{type}/{name}` I fixed this for my needs by changing the line to: `curl -X PUT https://api.godaddy.com/v1/domains/$domain/records/TXT/_acme-challenge.${2} -H "Authorization: sso-key $apikey:$secret" -H "Content-Type: application/json" -d "[{\"name\": \"_acme-challenge.${2}\", \"ttl\": 600, \"data\": \"${4}\"}]"` A disclaimer in the Wiki for this example would be a nice to have. It removed my SPF records twice now.
adam closed this issue 2025-12-29 01:20:19 +01:00
Author
Owner

@RyanSquared commented on GitHub (Sep 17, 2017):

You can add a disclaimer yourself, it looks like the wiki is user-editable.

@RyanSquared commented on GitHub (Sep 17, 2017): You can add a disclaimer yourself, it looks like the wiki is user-editable.
Author
Owner

@lukas2511 commented on GitHub (Sep 20, 2017):

The wiki and the mentioned hook scripts and tutorials are user maintained.
Like @RyanSquared said you can add a disclaimer yourself.

This is not a dehydrated bug, closing this issue.

@lukas2511 commented on GitHub (Sep 20, 2017): The wiki and the mentioned hook scripts and tutorials are user maintained. Like @RyanSquared said you can add a disclaimer yourself. This is not a dehydrated bug, closing this issue.
Author
Owner

@JBHaire2004 commented on GitHub (Jan 15, 2025):

"A disclaimer in the Wiki for this example would be a nice to have. It removed my SPF records twice now."

Disclaimer: If you run commands you don't understand; the execution of those command may result in outcomes you don't like.

@JBHaire2004 commented on GitHub (Jan 15, 2025): "A disclaimer in the Wiki for this example would be a nice to have. It removed my SPF records twice now." Disclaimer: If you run commands you don't understand; the execution of those command may result in outcomes you don't like.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/dehydrated#251