Support

Forum

A place for Dynadot and community experts alike to ask questions, share ideas, and more.
Setting Sub Domains with "set_dns" - Not Working
When I try to set a sub domain using the set_dns command, it wipes out all my sub domain records. This is the url I've been using to try this: https://api.dynadot.com/api3.html?key=MY_KEY&command=set_dns&domain=MY_DOMAIN&main_record_type=a&main_record=IP_ADDRESS&sub_record_type0=a&sub_record0=SUB_IP_ADDRESS
j_w_blaine_us replied j_w_blaine_us
I'm not sure if you're following the issue I'm trying to point out. If I want to change just one parameter and don't specify all parameters, it will wipe out all the other parameters that I don't specify. For example, lets say I have a dns that looks like this: Domain Record | type | IP mydomain.com | A | 0.0.0.1 Sub Record | type | IP test1.mydomain.com | A | 0.0.0.2 test2.mydomain.com | A | 0.0.0.3 Now lets say I want to just change the IP address of sub record 0 (test1) to 0.0.0.4. If I use the following query string, it'll wipe out all the other settings in the dns: (i've broken the url in multiple lines for readability) https://api.dynadot.com/api3.html? key=MY_KEY& command=set_dns& domain=mydomain.com& sub_record0=0.0.0.4 In order for it to change what I want and keep all the other settings in the dns record, the query string has to have all the settings for the dns record that you want to keep. Staying with the current example, I'd have to do this to get it to not wipe out the other settings: https://api.dynadot.com/api3.html?key=MY_KEY& command=set_dns& domain=mydomain.com& main_record_type=a& main_record=0.0.0.1& subdomain0=test1& sub_record_type0=a& sub_record0=0.0.0.4& subdomain1=test2& sub_record_type1=a& sub_record1=0.0.0.3 This is unnecessarily extraneous, and makes it easy to accidentally wipe out your dns records. It'd be ideal to only have to include the parameter you want to change in the query string, and not have to include all the other parameters that you don't want to change in the dns record.
Reply Quote
0 Replies
teamdynadot replied j_w_blaine_us
Yes, we do understand your point, but this was an intentional decision. We can throw it back up for discussion. Do other users here feel the same way?
Reply Quote
1 Replies
j_l_columbus_us_2 replied teamdynadot
This issue raises in 2013, and i can't believe Dynadot Architect and Engineers are still not improving their API. Is 2021, fast forward 7 years, the same issue happens to me. I just signed up recently and I was shocked to see the same issue. it DOESN'T MAKE SENSE to wipe out all the records by just needed to add 1 record. The solution given to me is that when adding 1 record, i need to make sure i include all the previous records. If i have 40 records, wanted to add 1, i have to submit my payload with total of 41 records. How on earth i get the previous 40 records in the first place ? This is definitely a design issue. go-acme/lego has rejected to add dynadot as their provider when I was talking to them https://github.com/go-acme/lego
Reply Quote
0 Replies
teamdynadot replied j_w_blaine_us
Thank you for your patience. The issue should now be resolved.
Reply Quote
0 Replies
j_w_blaine_us replied j_w_blaine_us
Thanks. It sort of works now. When using "set_dns" to change a subdomain it'll now apply the changes to the subdomain you specify but will wipe out all the other DNS settings for that domain that you don't specify - including the MX records. I found this out the hard way when someone told me they got a returned email when they sent me an email to one of my domains that I have custom MX records set. Can you get "set_dns" to apply changes only to the settings you specify without wiping out the rest of the DNS settings for that domain? Thanks again!
Reply Quote
0 Replies
teamdynadot replied j_w_blaine_us
Yes, certainly. I've forwarded the request to our engineers. Thank you for letting us know.
Reply Quote
0 Replies
teamdynadot replied j_w_blaine_us
Thanks for your patience. This is actually how the set_dns command is intended to function. The system will read any subdomain records not included as blank and will set them as such.
Reply Quote
0 Replies
b_i_l_newark_us replied j_w_blaine_us
try
Reply Quote
0 Replies
j_w_blaine_us replied j_w_blaine_us
But it's also wiping out the MX records. It seems a little extraneous to include all dns settings (including MX records) in one call to only change one part of the dns settings.
Reply Quote
0 Replies
teamdynadot replied j_w_blaine_us
I understand your point, but MX records are part of the DNS page and so they are included in the 'set_dns' command.
Reply Quote
0 Replies
teamdynadot replied j_w_blaine_us
We'll ask a tech to look into this tomorrow. Thank you.
Reply Quote
0 Replies
encrypts replied j_w_blaine_us
I realize this thread is really old just found it through googling. The fact that I have to submit ALL of the information again rather than just say change sub_record_type9=whatever is kind of ridiculous.
Reply Quote
0 Replies
teamdynadot replied j_w_blaine_us
Thank you for the feedback, we appreciate your thoughts and are always working towards improving our products and services.
Reply Quote
0 Replies
j_l_columbus_us_2 replied j_w_blaine_us
This issue raises in 2013, and i can't believe Dynadot Architect and Engineers are still not improving their API. Is 2021, fast forward 7 years, the same issue happens to me. I just signed up recently and I was shocked to see the same issue. it DOESN'T MAKE SENSE to wipe out all the records by just needed to add 1 record. The solution given to me is that when adding 1 record, i need to make sure i include all the previous records. If i have 40 records, wanted to add 1, i have to submit my payload with total of 41 records. How on earth i get the previous 40 records in the first place ? This is definitely a design issue. go-acme/lego has rejected to add dynadot as their provider when I was talking to them https://github.com/go-acme/lego I need a solution from Dynadot for this and stop using XML for API please. Please make a new version 4 that support JSON
Reply Quote
0 Replies
e___us replied j_w_blaine_us
It's 2022 now, 9 years past and it is still an issue. If `set_dns` or `set_dns2` is designed to work this way. Could you provide a new API, namely `update_dns_record`, supports updating/adding a single DNS record under a specific domain?
Reply Quote
2 Replies
teamdynadot replied e___us
Thanks for your suggestion. We will definitely forward your request to our API team.
Reply Quote
0 Replies
chrisonline1205 replied e___us
Just found this thread after trying to add one record and ALL my other records are now gone :-( Please, please change this or add at least another option for "update_dns_record".
Reply Quote
0 Replies
chrisonline1205 replied j_w_blaine_us
Just found this thread after trying to add one record and ALL my other records are now gone :-( Please, please change this or add at least another option for "update_dns_record".
Reply Quote
3 Replies
teamdynadot replied chrisonline1205
Yes, we have the requests from you guys and will definitely change this part as soon as possible.
Reply Quote
0 Replies
teamdynadot replied chrisonline1205
Hi, this has actually been solved a long time ago. Please try this command: https://www.dynadot.com/domain/api-commands#set_dns2. For parameter "add_dns_to_current_setting (optional)", if you want to append the new DNS settings to existing Dns settings. Set it equal to "1" (optional).
Reply Quote
0 Replies
b_l_rostock_de replied teamdynadot
add_dns_to_current_setting does not update the selected record, it creates an additional, duplicate record please add an update_dns_record option, as was requested, so that we can update a single record without deleting other ones or duplicating the one we are updating
Reply Quote
0 Replies
s_l_tallai_au replied j_w_blaine_us
Hello from 2024. Over a decade and this is still a bug?
Reply Quote
1 Replies
teamdynadot replied s_l_tallai_au
Hi, this has actually been solved a long time ago. Please try this command: https://www.dynadot.com/domain/api-commands#set_dns2. For parameter "add_dns_to_current_setting (optional)", if you want to append the new DNS settings to existing Dns settings. Set it equal to "1" (optional).
Reply Quote
0 Replies
s_l_tallai_au replied j_w_blaine_us
Actually, it's almost 2025. Anyway, this is extremely annoying. I have a simple bash cronjob updating the A and AAAA address on my domains, and wanted to also add in TXT entries that are required by LetsEncrypt when doing DNS01 challenges for some domains (with a middleware API).
Reply Quote
3 Replies
s_l_tallai_au replied s_l_tallai_au
But that doesn't work, because modifying any record, even say main_record15 will overwrite the A and AAAA entries recorded by the cronjob.
Reply Quote
0 Replies
s_l_tallai_au replied s_l_tallai_au
So now for each domain, I have to check what's currently there and update appropriately, for any I want to update. I essentially need to create a wrapper API around Dynadots because for some reason, this bug hasn't been fixed in 12 years?
Reply Quote
0 Replies
teamdynadot replied s_l_tallai_au
Hi, this has actually been solved a long time ago. Please try this command: https://www.dynadot.com/domain/api-commands#set_dns2. For parameter "add_dns_to_current_setting (optional)", if you want to append the new DNS settings to existing Dns settings. Set it equal to "1" (optional).
Reply Quote
0 Replies
b_l_rostock_de replied j_w_blaine_us
How can I simply *update* a subdomain's existing A record? I don't want to create an additional, duplicate A record.
Reply Quote
1 Replies
a_b_phoenix_us_4 replied b_l_rostock_de
This is crazy, such terrible behavior. I want to update the A/MX/TXT/CNAME record at a specific location, not add a new one, or wipe out the whole dns zone!
Reply Quote
0 Replies