Skip to main content

A DNS entry for domain already exists error

Comments

10 comments

  • 24x7server
    Hi, Are you trying to create cPanel account that is same as hostname? Can you check if the DNS zone is present for the domain that you are creating in the cPanel?
    0
  • mvandemar
    Hi, Are you trying to create cPanel account that is same as hostname?

    Not exactly, no. The hostname is vps.domain.com, and the nameservers are ns1. and ns2.domain.com, as I mentioned in the initial post.
    Can you check if the DNS zone is present for the domain that you are creating in the cPanel?

    Yes, it is present, I am assuming it was added when I set the hostname and nameservers. My question is how can I now add a cpanel using that main domain. -Michael
    0
  • mvandemar
    So looking further, I see when I go to Edit DNS Zone, that there is an entry for domain.com, where vps.domain.com is defined, and then two separate entries, one each for ns1. and ns2.domain.com. Would it be safe to rename the first record, which defines the SOA, to vps.domain.com, and remove the generic domain.com entries within that? Would that break anything, and would doing so allow me to then create the domain.com cpanel account? -Michael
    0
  • cPanelLauren
    Hi @mvandemar Technically, this shouldn't happen but in this instance can you try removing the entry for domain.com from the DNS zone then adding the domain again? Once the domain is added they should all be able to share the same DNS Zone file without issue. Thanks!
    0
  • mvandemar
    Do you mean delete the zone altogether? If I do that will it mess up anything else, like the nameservers? This is what it looks like now (see attached). I already deleted the A record for domain.com from this zone. Can I rename the zone to vps.domain.com? Do you think that would mess anything up, and if I did do it do you think it would work? -Michael
    0
  • cPanelLauren
    Hi @mvandemar No, that's not quite what I meant, I meant to remove the entry for domain.com only but it looks like the whole zone is named for domain.com Is there an entry for domain.com in /etc/named.conf?
    0
  • mvandemar
    Yes, looks like this: zone "domain.com" { type master; file "/var/named/domain.com.db"; };
    0
  • cPanelLauren
    Hi @mvandemar In this instance here's how I was able to make this work: 1. Rename/move the dns zone file in my instance I did the following (just moved it to the /root dir): mv /var/named/domain.com.db /root/
    2. rebuild the dns configuration /scripts/rebuilddnsconfig
    3. Confirmed after rebuild that the domain.com entry no longer existed in the named.conf as well as in /var/named/ 4. Readded domain. In your case, you'll most likely want to copy some or all of the entries from the previous DNS zone file to the newly created zone file. Thanks!
    0
  • mvandemar
    Now I am getting this: Account Creation Status: failed (XID 37spbu) "nobody" already controls the domain name "www.domain.com".
    I went into /var/named and grepped for www\.domain\.com but nothing came back. Any ideas? Edit: I found a solution. The /var/cpanel/users/system file had an entry that looked like this: DNS1=domain.com I edited that out, ran /scripts/updateuserdomains, and was able to add the cpanel in. Thanks! -Michael
    0
  • cPanelLauren
    Hi @mvandemar Yea, that was exactly the solution I would have suggested for that as well. I'm glad you got the domain added! Thanks for keeping us updated as well :)
    0

Please sign in to leave a comment.