Error: The Domain already exists in Apache Configuration

Sometimes when we try to add a subdomain, parked, or add-on domain via cPanel it causes an error:

[wpfmb type=’error’ theme=2]The Domain already exists in Apache Configuration[/wpfmb]

To resolve this error we have to remove all instances of the domain name.

1. First verify Ownership of the Domain in question:

grep /etc/userdomains

2. Verify if a DNS Zone exists for the Domain:

ls –ld /var/named/

3. Kill the DNS Zone for the domain:


4. Now, We will make sure no cPanel Users are showing existing traces of the domain:

grep /var/cpanel/users/*

It will give a result similar to:/var/cpanel/users/

5. Edit any files that have the traces, you can use any editor such as vi or nano.

6. Rebuild the Domain Databases:


7.  Rebuild the Apache Configuration:

#service httpd restart

You should now be able to add the domain without any error.