Sometimes you may find that a domain just won’t go away from cPanel. You may be trying to simply remove an addon domain or a parked domain, or you may be trying to re-add a domain that was at some point on the server. Now you’re either unable to do so, or you’re getting a ‘domain already exists’ type error. Here is a checklist of things to check to clear out the domain via SSH:
- Remove domain from /etc/userdomains
- Remove domain from /etc/trueuserdomains
- Remove domain from /etc/named.conf
- Move zone file from /var/named/ to /root
- Reload named via ‘rndc reload’
- Edit user file in /var/cpanel/users/ to not contain the domain(s)
- Remove vhosts from /etc/httpd.conf
- Reload apache via ‘service httpd stop; sleep 10; service httpd startssl;’