“Domain already exists” error while adding addon domain in cpanel.

If you are trying to add-on a domain in cPanel and get “Domain already exists” messages, you will have to manually remove the DNS entries before you can add the domain.

Actually, you can get an error message if you are adding domains that have similar names – meaning mydomain.com and mydomain.net – the .com will work, but you will have to use a different FTP name for the .net domain to work. If this is not the case, then please follow the steps below.

If you are unsure who the user is – run this via SSH to get the owner of the domain:

#/scripts/whoowns domain.com

First, try and remove the DNS zone via WHM – Home » DNS Functions » Delete a DNS Zone.

If the DNS zone is not present then you will have to remove it manually on the server.

SSH into server and run this:

#/scripts/killdns domain.com  (where domain.com is the name of the domain you are trying to add in cPanel)

These are the locations to search for any reference to domain.com

/etc/named.conf
/usr/local/apache/conf/httpd.conf
/var/named/domain.com.db
/etc/userdomains
/etc/localdomains
/var/cpanel/users/<username>
    • Note: replace any instance above of domain.com with the domain you are trying to add in cPanel. Also <username> is the username of the hosting account.

After you have removed all instances of domain.com, run this

# service cpanel restart
# /scripts/updateuserdomains

You should now be able to add the domain in the ‘add-on domains’ section in cPanel.
IMPORTANT: BACK-UP EVERY FILE FIRST BEFORE YOU MODIFY IT!