⚠️ Common Error Message
(XID xxxxx) A DNS entry for “example.com” already exists. You must remove this DNS entry from this server or all servers in the DNS cluster to proceed.
This frustrating error can prevent you from adding a domain in cPanel or WHM. It usually appears when trying to:
-
Recreate an addon domain or parked domain
-
Restore a domain after deleting a previous cPanel account
-
Use the "Share Document Root" option with addon domains
Let’s resolve this in just a few steps. ✅
🔍 Why Does This Error Occur?
This error means a DNS record for the domain already exists somewhere on the server. It could be:
-
A leftover DNS entry from a deleted or deactivated hosting account
-
A subdomain record created using the "Share Document Root" feature
-
An orphaned DNS reference in the cPanel user configuration files
✅ Step-by-Step Guide to Fix the Issue
👀 Step 1: Locate the DNS Reference
Run the following command via SSH as the root user:
grep -Ri "example.com" /var/cpanel/users/
Replace
example.com
with your actual domain name.
This command will help you identify which cPanel user file still has a hidden reference to the domain.
📁 Step 2: Remove the Entry from the User File
Option A: Manual Edit with nano
nano /var/cpanel/users/username
Look for any line like:
XDNS1=example.com.yourdomain.com
🔊 Delete that line, then save and exit:
-
Press
Ctrl + X
-
Press
Y
to confirm -
Press
Enter
to save
Option B: One-Line Command with sed
(Recommended)
If you want to skip manual editing:
sed -i '/example.com/d' /var/cpanel/users/username
⚠️ Replace
username
with the one found in Step 1.
♻️ Step 3: Rebuild cPanel Cache and Configuration
Clear cached data and rebuild the configurations:
rm -f /var/cpanel/users.cache/username
/scripts/updateuserdatacache
/scripts/rebuilddnsconfig
/scripts/rebuildhttpdconf
✅ Replace
username
with the actual user found earlier.
⚡️ Step 4: Re-add the Domain
Now go back to cPanel or WHM and add the domain again. You should now be able to:
-
Add the domain as an addon or parked domain
-
Create a new account with this domain
-
Avoid the DNS entry conflict entirely
📆 Pro Tips
🔗 DNS Cluster: If you’re using a DNS Cluster, make sure the DNS zone is also removed from all connected servers.
🧠 Stale Entries: These often come from previously deleted accounts or domains added with the "Share Document Root" option.
🌍 Double-check: Repeat the grep
command if you're not sure the domain is fully removed from all configs.
❓ Need Help?
If you're unsure or would prefer guided help, our expert team at Domain India is here to assist:
✉️ Submit a support ticket: https://www.domainindia.com/support
📅 Schedule a callback for guided support
🌐 Access our full Knowledgebase: https://www.domainindia.com/knowledgebase