You go to add a domain in cpanel" class="auto-link">wordpress-missing-a-temporary-folder-upload-error" class="auto-link">cPanel, hit Submit, and cPanel refuses: the domain "already exists", or it's "owned by another user", even though you're sure it isn't on your account. This one comes up in our support queue a lot, usually right after a migration, a cancelled hosting plan, or a domain being moved from one cPanel account to another. Here's what's going on and how to clear it without breaking anything.
Symptom: The Exact Errors You'll See
The wording changes a little between cPanel versions, but it's usually one of these:
The domain "example.com" already exists in the userdata.example.com is already owned by another user.The system failed to create the DNS zone because "example.com" already exists.The subdomain "example.maindomain.com" already exists.(when adding an addon domain)The DNS zone already exists on a cluster member.(servers in a DNS cluster)
All of them mean the same thing: some part of the server still has a record of that domain, and cPanel won't create a second copy.
Cause: Where the Leftover Record Lives
A domain on a cPanel server isn't stored in just one place. It sits in several files, and if any one of them still has it, the add fails. The usual culprits:
| Leftover | Where it lives | Typical reason |
|---|---|---|
| DNS zone | /var/named/example.com.db | Account was deleted but the zone was kept, or a zone was added by hand in WHM |
| Domain ownership map | /etc/userdomains, /etc/trueuserdomains | The domain still belongs to another (or an old) cPanel user |
| Account userdata | /var/cpanel/userdata/<user>/ | A removal that didn't finish, often after a timeout or a failed restore |
| Hidden subdomain | example.maindomain.com | An addon domain was removed but its backing subdomain stayed behind |
| Alias (parked) domain | Domains → Aliases | You (or a previous admin) already added it as an alias |
| DNS cluster | Another server in the cluster | The zone was created on a different node |
Fix 1: Check Your Own cPanel Account First
Before you go hunting through server files, make sure it isn't already sitting on your own account.
- In cPanel, open Domains → Domains. Use the search box for the domain. If it's there as an alias or addon, you don't need to add it again. Just change its document root if that's what you actually wanted.
- Still in Domains, search for the subdomain form, like
example.maindomain.com. If it shows up as a plain subdomain, delete it, then add the addon domain again. - Check Domains → Zone Editor. If there's a zone for the domain but no matching domain entry, that's an orphaned zone, and you'll need Fix 2.
Shared hosting customers: if the domain isn't anywhere in your cPanel and you still get "owned by another user", you can't clear it yourself, because the record belongs to another account on the server. Open a SkyServer support ticket with the exact error text and we'll check who owns it and clean it up.
Fix 2: Remove an Orphaned DNS Zone (WHM / VPS)
This is the most common cause after an account was terminated with "Keep DNS zone" ticked, or after a zone was created by hand in WHM.
In WHM go to DNS Functions → Delete a DNS Zone, tick the domain and confirm. Or do it over SSH as root:
# Confirm the zone exists and look at what's in it first
ls -l /var/named/example.com.db
cat /var/named/example.com.db
# Remove the zone cleanly (also updates named.conf and the DNS cluster)
whmapi1 killdns domain=example.com
Don't just rm the .db file. That leaves a dangling entry in named.conf, and if you're clustered, the other nodes keep their copy. killdns handles all of that.
If you're in a DNS cluster and the error mentions a cluster member, log into that node's WHM and delete the zone there too. Then run DNS Functions → Synchronize DNS Records from the server that should own it.
Fix 3: Find Out Which Account Owns the Domain
For "already owned by another user", find the owner:
grep -i "example.com" /etc/userdomains
grep -ri "example.com" /var/cpanel/users/
You'll get a line like example.com: olduser. Now you've got three options:
- The other account should keep it. Leave it alone and point the customer to the right login.
- Move it. Remove the domain from
olduser's cPanel (Domains → Domains → Manage → Remove Domain), then add it to the new account. Take a backup of that site's files and email first, because removing a domain can drop its mailboxes. - The account is gone but the map isn't. If
olduserdoesn't exist anymore (ls /var/cpanel/users/olduserreturns nothing), the ownership files are just stale. Rebuild them:
/scripts/updateuserdomains
/scripts/rebuildhttpdconf
/scripts/restartsrv_httpd
updateuserdomains rebuilds /etc/userdomains and /etc/trueuserdomains from the real account data, so ghost entries drop out.
Fix 4: Clean Up Leftover Userdata
If a domain removal timed out halfway through, you can end up with the domain still in that user's userdata even though cPanel doesn't show it. Check:
ls /var/cpanel/userdata/olduser/ | grep example.com
grep -n "example.com" /var/cpanel/userdata/olduser/main
If you find leftovers, the safest route is to re-add and then properly remove the domain through cPanel so it cleans up after itself. Hand-editing main works, but it's easy to break the YAML. If you go that way, copy the file first (cp main main.bak), remove only the lines for that domain, then run:
/scripts/updateuserdatacache
/scripts/updateuserdomains
/scripts/rebuildhttpdconf
Fix 5: When It's a Subdomain of Another Account's Domain
Say shop.example.com should live on a different cPanel account than example.com. By default cPanel blocks that, because it treats subdomains of an owned domain as belonging to that owner. On a VPS you can allow it in WHM → Server Configuration → Tweak Settings → Domains:
- Allow users to park subdomains of the server's main domain: only if the domain is under the server hostname's domain.
- Allow cPanel users to create subdomains across accounts: lets account B add
shop.example.comeven though account A ownsexample.com.
Only turn these on if you trust everyone on the server. On a reseller or multi-tenant box, letting one user claim subdomains of another user's domain is a real security risk.
Verify It Worked
Add the domain again in cPanel. Once it's accepted, check that everything got created properly:
grep example.com /etc/userdomains # should now show the NEW user
ls /var/named/example.com.db # fresh zone exists
dig @127.0.0.1 example.com A +short # answers with your server IP
Then run AutoSSL for the account (cPanel → SSL/TLS Status → Run AutoSSL) so the new domain gets a certificate straight away.
Prevention
- When you terminate an account in WHM, leave Keep DNS Zones unticked unless you really mean to keep them.
- Remove domains through cPanel or WHM, not by deleting folders or zone files by hand.
- Before a migration, list the domains on the old account and remove them there first if they're moving to a different account on the same server.
- After a big restore or transfer, run
/scripts/updateuserdomainsto make sure the ownership maps match reality.
Frequently Asked Questions
Will deleting the DNS zone take my website offline?
Only if that zone is the one actually answering for the domain. Check the domain's nameservers first with dig NS example.com +short. If they point to this server, add the domain again straight after removing the zone so a new zone replaces it within a minute or two.
I'm on shared hosting. Can I fix "owned by another user" myself?
No. The record belongs to another account, and only root can see or change it. Send SkyServer support the domain and the exact error, and we'll release it once we've confirmed you own it.
Why does removing an addon domain leave a subdomain behind?
Every addon domain is backed by a subdomain of your primary domain. If the removal is interrupted, by a timeout or a browser closing mid-request, the subdomain part can survive. Delete it under Domains and the addon will add cleanly.
Is it safe to edit /etc/userdomains directly?
It's not worth it. cPanel regenerates that file, so manual edits get overwritten. Fix the real source (userdata or the account) and run /scripts/updateuserdomains instead.
