Small blog about system administration.

cPanel - Domain already exists error while adding a subdomain or addon domain

A very common error  when adding an addon or parked domain via cpanel. Unfortunately, the error they see is usually very generic and doesn’t provide any information such as “can not create domain”. This is usually due to the domain name existing anywhere in the cPanel configuration and checking these locations/steps out should help you find the domain that is lurking somewhere and causing the issues.

Reason 1: There is an existing zone file on the server.

1) You can use the following command to check whether zone exists or not,

# dig @server_ip

If there is a zone file exists, this will show the A record of the

2) If there is a zone file that exists, log into the server that the zone file is pointing to and make sure the domain doesn’t exist:


If it does, you would need to remove this prior to adding their new addon domain. If it does not, continue on

3) Remove the zone file from the server by running the following command:


This will remove the DNS zone and will help you add the addon or parked domain again.

Reason 2: There are old traces of the domain on the server

1) Log into the server where the customer is seeing problems adding the domain and confirm that the domain does not exist on the server.


2) Check Cpanel files for traces of the problem domain name

grep /var/cpanel/users/*

grep -R /var/cpanel/userdata/*

3) Edit any files that are found and remove the traces of the domain name the customer is trying to add. You also may need to remove the entire file for the domain in the /var/cpanel/userdata/USERNAME/ directory.

 4) Rebuild the user domains database


5) Rebuild the Apache configuration and make sure apache is running with all traces of the bad domain removed.

# service httpd restart

This should have all traces that were left behind from when this domain name was removed in the past and then will no longer cause a conflict when the customer tries to add the domain again.

No comments :

Post a Comment