Symptoms
When adding a domain to your cPanel account, you receive the following error:
The domain “domain.tld” may not be created by “user” because “domain.tld” is already
owned by another user."
Description
This occurs if the domain has already been added to another user's account or added to the "system" user file.
Workaround
You will need to find where the domain is added and remove it to proceed.
- Connect to your server using SSH as the root user.
-
Run the following command to search for the domain name, replacing 'domain.tld' with the domain you wish to add:
grep domain.tld /etc/userdomains /var/cpanel/users/* -
If the domain is listed as being owned by a different user, it can be removed from the tools within that user's cPanel:
[root@hostname]# grep domain.tld /etc/userdomains /var/cpanel/users/* /etc/userdomains:domain.tld: otheruser /var/cpanel/users/otheruser:DNS1=domain.tld -
If the domain is listed as being owned by 'nobody' and shows up in the 'system' users file, it must be removed manually:
[root@hostname]# grep domain.tld /etc/userdomains /var/cpanel/users/* /etc/userdomains:domain.tld: nobody /var/cpanel/users/system:DNS1=domain.tld -
Open the following file with your preferred text editor:
/var/cpanel/users/system - Remove the "DNS" line that contains your domain and save the file.
-
Rebuild the domain configuration within cPanel:
/scripts/updateuserdomains --force
You should now be able to add the domain to the intended account.
Comments
0 comments
Article is closed for comments.