If you encounter one of these errors::

Error from park wrapper: example.com is already configured. Sorry, that domain is already setup (remove it from httpd.conf)

Error from park wrapper: example.com is owned by another user

 
In order to completely solve these errors, I suggest you follow the steps presented below, which I developed by repeatedly running into this issue:

1. Check if the domain is really not configured in cPanel

I know you’re a technical guru, but sometimes simple information like adding a domain in your cPanel is not important enough to be retained :).

So, firstly check in your cPanel the following sections and make sure your domain is not already added:

– Addon Domains;

– Parked Domains;

– Subdomains. Yes, you must check subdomains because when you’re adding an addon domain which has a similar name with a previous configured addon domain, the subdomain which is automatically created might be identical, so this is a frequent cause of conflict.

2. Check for an “orphaned” DNS Zone

Sometimes, a previously configured domain, after removal, might have left behind its DNS zone which can be easily removed through WHM > Delete a DNS Zone.

3. Remove any record of the domain name in cPanel’s configuration files

The following files should be checked for any remains of your domain name (I’d do that by grepping those files like: “grep -i ‘example.com’ /bla/bla/bla.conf”):

grep -i "yourdomain.com" /var/cpanel/users/* grep -i "yourdomain.com" /etc/userdomains grep -i "yourdomain.com" /etc/localdomains

If any recod of your domain shows up, that specific line should be removed with an editor (nano, vim, etc)

After editing any of these files, make sure you run the following command:

/scripts/updateuserdomains

4. Remove any reference of the domain in httpd.conf:

Check for any left-over configuration of your domain in Apache’s configuration file:

grep -i "youdomain.com" /usr/local/apache/conf/httpd.conf

If any reference shows up, then I would advise you to firstly create a backup of your httpd.conf:

cp /usr/local/apache/conf/httpd.conf /usr/local/apache/conf/_bkp_httpd.conf

After this, edit  httpd.conf with your favourite editor, remove any reference for “yourdomain.com” and save the file.
Restart apache:

service httpd restart

or

/etc/init.d/httpd restart

And try to add your domain again.

If the error still occurs, then you will have to move the secondary httpd.conf files to a different location, but keep the main httpd.conf and restart Apache.

The secondary httpd.conf files are usually named:

httpd.conf,v httpd.conf.bak httpd.conf.datastore httpd.conf.ea-make-install httpd.conf.ea-make-install,v httpd.conf.ea-orig httpd.conf.easyapache_save

And you can move them to a backup folder that you usually use [I do NOT recommend permanently deleting them].

After moving, restart your web server and add again your domain in cPanel.

 

If you followed all the steps mentioned above, then you have successfully removed any reference of your domain in the server’s configuration files and the domain name can be added in your cPanel.

 

For any questions, please post a comment below.

Leave a Reply