Loading
Rahmat S. Masror

MSCS, BBA, DIT, MCSE, CCNA, COM TIA+

IT Expert

Freelancer

IT Consultant

Server/Database Expert

3CX Advanced Certified Engineer

Rahmat S. Masror

MSCS, BBA, DIT, MCSE, CCNA, COM TIA+

IT Expert

Freelancer

IT Consultant

Server/Database Expert

3CX Advanced Certified Engineer

Blog Post

How to fix cPanel Domain already exists Error 2021

February 13, 2021 CPANEL/DIRECTADMIN
How to fix cPanel Domain already exists Error 2021

You get this error sometimes, when you are hosted using the cPanel

I parked yourdomain.com which redirects automatically to yourdomain.org.

I deleted the domain from Parked Domains panel, and added it back via the Addon Domains panel.

Then the error “Already Exists”, even though it was not listed in the Addon Domains nor was it listed in the Parked Domains.

This is due to the domain name existing anywhere in the cPanel configuration and need to get removed / deleted.

Check whether zone exists or not

dig @server_ip yourdomain.com

If the zone file exists, it will show the A record of yourdomain.com.

If zone file exists, log into the server and make sure the domain doesn’t exist

/scripts/whoowns yourdomain.com

If it does, you need to remove prior adding  the Addon domain.

Remove the zone file from the server

/scripts/killdns yourdomain.com

Now you have removed DNS zone and help you add the addon or parked domain.

There are old traces of the domain on the server

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

/scripts/whoowns yourdomain.com

Check cPanel files

grep domain.com /var/cpanel/users/*

grep -R domain.com /var/cpanel/userdata/*

Edit file/s that are found and remove domain name the customer is trying to add.

You also may need to remove the all the files related to domain name.

/var/cpanel/userdata/USERNAME/ directory

Rebuild user domains database

/scripts/updateuserdomains

Rebuild Apache to make sure all  entires of bad domain removed.

/scripts/rebuildhttpdconf

service httpd restart

This should have all entries left behind from when this domain name was removed in the past no longer conflict, when you try to add the domain again.

Tags: