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 :
- 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
2. If the domain is not totally remove from cpanel : If you try to remove the domain from cpanel but error is still showing that “Sorry, that domain is already setup (remove it from httpd.conf?)” then it means your domain is not totally removed from httpd.conf file. Let’s see how to remove domain :
- 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) fromCode:/etc/httpd/conf/httpd.conf.
WHM >> Edit DNS Zone >> Edit DNS here.
- 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 fromCode:/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 :Note: now you can easily create your domain now in your WHM or Cpanel.Code:/scripts/updateuserdomains
How to Fix cPanel Error: Sorry, that domain is already setup (remove it from httpd.conf?)
Fix cPanel Error: Sorry, that domain is already setup (remove it from httpd.conf?)