Are you getting this Error: “Sorry, that domain is already setup (remove it from httpd.conf?)” ? Mostly this error shows when we are creating new account on WHM control panel. This is a common error which you can get on WHM while creating new domain into your list. This error clearly states that your Apache configuration file (httpd.com) still has entries of domain which you are trying to add. Here are some methods due to which you can solve this error.
Why we are getting this error ?
1. If you are getting this error it might be possible that the domain is already created in cpanel as a main domain or add-on domain.
2. The second reason is that you removed the domain from your cpanel but domain is not completely removed from system.
How to remove this error ?
Here are the steps from which you can remove all the DNS settings of domain from server which causes the error. if the domain is available on server or it is removed from server but sometimes the DNS entries not removed properly due to some problem, then you have to follow the steps described below.
1. If the domain is already created on server : To remove this error first you have to make sure that there is no same domain name exists. You can check this in by listing accounts from cpanel or WHM. If it’s not your main domain then it may be possible that it is a parked domain, sub-domain or add-on domain. If the domain is already created on server then you have to remove by following the steps :
First you have to list all domains from server which you cannot find in cpanel or WHM and then you have to remove all the entries :
Note: now you can easily create your domain now in your WHM or Cpanel.
Why we are getting this error ?
1. If you are getting this error it might be possible that the domain is already created in cpanel as a main domain or add-on domain.
2. The second reason is that you removed the domain from your cpanel but domain is not completely removed from system.
How to remove this error ?
Here are the steps from which you can remove all the DNS settings of domain from server which causes the error. if the domain is available on server or it is removed from server but sometimes the DNS entries not removed properly due to some problem, then you have to follow the steps described below.
1. If the domain is already created on server : To remove this error first you have to make sure that there is no same domain name exists. You can check this in by listing accounts from cpanel or WHM. If it’s not your main domain then it may be possible that it is a parked domain, sub-domain or add-on domain. If the domain is already created on server then you have to remove by following the steps :
First you have to list all domains from server which you cannot find in cpanel or WHM and then you have to remove all the entries :
- First find the domain owner by entering following command :
Code:
/scripts/whoowns sitename.com
- If you get the detail then it’s good but if you does’ t find any result then you have to try this command :
Code:
grep sitename.com /var/cpanel/users/*
- You will get following result :
Code:
root@server [~]# grep sitename.com /var/cpanel/users/*
/var/cpanel/users/exam:XDNS1=sitename.com
- Now you are the account owner and you can remove the domain easily.
- First you have to try to delete the DNS zone from WHM to remove all the DNS zone entries.
- You can also remove the virtualhost (httpd.conf) from
Code:
/etc/httpd/conf/httpd.conf.
- Now check all the A records of that domain if there is any A records available then remove it from WHM
- You can also manually remove the data from
Code:
/var/named/yoursite.com.db.
- At last you have to delete all the entries related to that domain name from these files:
Code:
/var/cpanel/users/username
/etc/userdomains
/etc/localdomains
/etc/named.conf
- To update DNS dataset run this command :
Code:
/scripts/updateuserdomains