DNS entry for the domain already exists


Active Member
Nov 3, 2014
cPanel Access Level
Root Administrator
Trying to add domain as an addon domain after terminating the account which had that domain as primary. I get this common error.

A DNS entry for the domain “mydomain.com” already exists.

So I did everything. See below:

/scripts/whoowns domain.com

nothing. Yes I'm replacing `domain.com` with my actual domain.

/scripts/killdns domain.com


grep mydomain.com /etc/userdomains

nope nothing


not there


not there either


nope, none there


not there


not there


not there

/scripts/killdns mydomain.com

then restart both bind and httpd

still same error.

dig @IPAddress mydomain.com

This shows the former content from named.config, but this is not actually in named.conf, nor in anything else, as you can see above.

I contacted my system admin and I told myself that I already tried all these things (I am the only point of contact, no one else, it's just me and it is my server).

I also ran grep to try to see if I could find any instances, removed all that was possible, but still nothing.

[email protected] [/]# grep -rl "mydomain.com" /etc/*

It's listed a couple times but these are archive files and shouldn't affect anything.

Similar with var:

[email protected] [/]# grep -rl "mydomain.com" /var/*
grep: /var/clamd: No such device or address
/var/cpanel/user_notifications/root/history/1432358935_wwwacct___[server.myserver.com] New account: mydomain (mydomain.com).eml

Came here as a last resort. Please help.
Last edited:


Staff member
Apr 11, 2011

Could you open a support ticket using the link in my signature so we can take a closer look? You can post the ticket number here so we can update this thread with the outcome.

Thank you.


Well-Known Member
Jan 2, 2006
Did you find a solution to this? We're using a cpanel DNS cluster but I think the same problem applies to us and I've noticed this happening quite a lot recently.

There was a time when removing a domain would delete the DNS entries instantly and you could add it again straight away. Then a while back we noticed that there was a time delay - after removing a domain and trying to add it again, we would get the DNS entry already exists error for a couple of minutes, as if the data was still temporarily cached. No problems with that.

More recently, we are seeing more regular instances of "DNS data" not being correctly removed when a domain is removed in cpanel or WHM - I say "DNS data" because I don't know the exact problem. It seems the zone file does get removed, but there is something else left behind that stops the domain from being added again. Running the /scripts/killdns script does seem to resolve it most of the time and it is more effective if you run it from all nameservers in the cluster and also the server you are adding the domain to. This has been happening for years off and on - but it does seem to be more frequent these days.

There have been a few instances recently of the exact problem described in the original post above. An example of this is yesterday - a client added 20 parked domains (sorry aliases) to their plan and then removed all of them - then proceeded to add them to another plan but received "the DNS entry already exists" error. So I ran the /scripts/killdns script to make sure the domains were fully removed. It made no difference. The domains couldn't be added.

I went through similar steps as the OP above, even resorting to a grep for instances of the domains in various places. Nothing. Same error. I asked the client to wait until this morning to try again. Same problem.

Then I ran the /scripts/killdns script for like the fourth time on all nameservers and the server I was adding it to just now - and as usual it reported that "the zone was possibly removed earlier".

However, after this time running the script again we were able to add the domains. So the script must still be doing something other than removing the zone file as it reports that the zone does not exist. Why is it necessary to run this script multiple times though before it finally works? It's a mystery!

I'd be interested to know exactly what different actions the killdns script is performing. It seems to run a "removezone" function within Cpanel::DnsUtils but whether that function simply deletes the zone file or performs other actions I don't know. You'd think if it can't complete one or more of those actions, there would be some error returned or logged.
  • Like
Reactions: jpjai


Staff member
Apr 11, 2011
Hello @4u123,

Would you mind opening a support ticket so we can take a closer look at the affected system to see what's happening? Please post the ticket number here and we will update this thread with the outcome.

Thank you.