This might occurs when domain name never shows up under Add-on Domains in cPanel but actually it does exists anywhere in the cPanel configuration. Following is the way defined below, to remove any trace of the domain from cPanel configuration manually.
1.) Firstly you need to verify if the domain is owned by any particular user by following command,
/scripts/whoowns mydomain.com owner
#grep mydomain.com /etc/userdomains
2.) Now you need to check if the zone file for the domain exists.
# ls -ld /var/named/mydomain.com.db
If there exists a zone file for the domain, then remove the zone by executing the following command:
# /scripts/killdns mydomain.com
3.) Now check cPanel user files, to see if there exists any traces of the domain:
# grep mydomain.com /var/cpanel/users/*
# grep -R mydomain.com /var/cpanel/userdata/*
Binary file /var/cpanel/userdata/owner/main.cache matches
/var/cpanel/userdata/owner/main /var/cpanel/userdata/owner/main: mydomain.com: mydomain.testdomain.com
/var/cpanel/userdata/owner/cache: mydomain.com: mydomain.testdomain.com
Edit any files that are found and remove the entire line that contains the domain name. Once you’ve done this, there shouldn’t be any entry for mydomain.com in the cPanel configuration file.
4.) Rebuild the User domain database:
Rebuild the Apache configuration
5.) Now, restart the Web Server as the configuration file is altered.
If the server is running on apache
# service httpd restart
If the server is running on LiteSpeed:
# service lsws restart
Once all these steps are done, you should be able to add mydomain.com as an Add-on domain under the account ‘owner’.
- 36 Users Found This Useful
Kindly share some details about VPS hosting?
We are currently offering VPS hosting services from two different locations (USA &...What is Virtual Private Server (VPS) Hosting?
Virtual Private Servers (VPS) are the most advanced step in server virtualization technology and...Why should I choose VPS hosting?
You can choose the Virtual Private Server if you are designers, webmaster and if you are running...What level of control do I receive with my VPS package?
We provide you with full root access to the system which means you can modify server...Do you perform data backups for VPS users?
Yes, we do provide free weekly backup of VPS users which could be obtained upon request.