When adding a root cname through the API I get the error "Add an A, AAAA, or CNAME record for your root domain"


When I add a root cname through the API for dk domains it doesn’t appear to work and I get this error message: “Add an A, AAAA, or CNAME record for your root domain”. However if I go into the DNS tab in the web console and click edit and save then the problem resolves itself. Does anyone know how I can avoid this issue?

Adding will create a second record which is not permitted in a CNAME context, you can only edit.

Thank you for replying, maybe I wasn’t clear. The zone was created through the API exactly as shown in the screenshot, only one root cname record was added to the zone, there was no attempt to add a second root record.

Sorry, my bad, I misunderstood your question.

So you are saying you added the domain via the API (I presume you had jump_start enabled, right?) and got the attached screenshot as first screen when opening the DNS panel. Is that right?

If so, I’d say this is a cosmetic glitch and the UI ignores the fact the record was imported already. I would open a support ticket and report the issue.

No worries, I should have been clearer. That is correct I added the domain via the API and that is the first screen when opening the DNS panel. Jump Start is not enabled as it shouldn’t fetch existing DNS records, it should start from scratch.

I don’t see it as cosmetic as it stops the site working so I guess the error message is related to a real issue.

Then it shouldn’t have these two records to begin with however. So where did these records come from?

I am afraid I am still confused. My understanding was you added the domain via the API and that was the screen you got. If you added them via the API and they are listed, they should also work.

Could you describe the steps you took step-by-step (how was the domain added, how were the records added and so on)? That might make it easier to understand what might have happened.

Sorry, I’ll try to explain better

  • The zone was added by posting to the zones endpoint
  • The zoneidentifier was recorded
  • The cname records were added by posting to the dns_records endpoint using the zoneidentifier previously returned.

There are a few other calls for things like https but these don’t seem relevant, these calls have worked for a number of other sites in the past so I don’t think the problem lies there.

So the whole site was added using the api with no interaction using the console, however the dns doesn’t resolve so when I logged into the console I see the attached error, clicking edit and save fixes the issue and then the site resolve correctly.

Alright, so the whole domain as well as its records were added via the API. The records also did show up, however when you tried to resolve them it did not work. Is this an accurate summary?

Can you definitely rule out any DNS propagation issues or similar on your end?

Opening a support ticket might still be the best course of action as they should be able to trace the steps and can possibly find what the issue might have been.

Yes, that is correct.

Yes, these were set up for several days not working, as soon as the record was saved thought the web portal they started working, I have done this on multiple sites.

Best to open a support ticket.

I just tried the described steps and I am afraid I could not reproduce the issue.

I added a domain and two CNAME records (www and @) both via the API. There are difficulties resolving the www record, but I attribute this to the domain not being active. Apart from that the naked domain does resolve and the DNS screen does not display the warnings in question.

Thanks for trying to reproduce, I agree most of the time this doesn’t happen. The times I have seen it have been with domains ending in .dk and mixed case domain names. Although I’m not 100% sure if that is a coincidence or the cause.

I wouldn’t assume that it is TLD specific. Resolution issues could still be explained with the domain possibly not being active yet but the mentioned warnings should not be displayed when the records are in place.

Did you open a support ticket?

I just had another go at reproducing it myself by putting in a mixed case domain (adviserRATINGS.com.au) and I managed to get the issue again. So I suspect that I need to lowercase the domain before posting it to the zones endpoint.

That might be actually easily reproducible. Let support know about the difference in case :slight_smile:

1 Like

Yes, seems to be a case issue. In this way I can reproduce it too. Seems to be they check something in the dashboard which they do not via the API.

1 Like

Thank you for confirming :star2: I am just raising a ticket with support now.

I’ve put the ticket in and will wait to see what Support say, thank you for all your help Sandro!

1 Like

This topic was automatically closed after 31 days. New replies are no longer allowed.