Troubleshooting & Common Errors

Fixing the "A DNS entry for the domain already exists" Error When Adding an Addon Domain in cPanel

Published · Updated 2 min read
Knowledge base article
Contents (9 sections)

When adding an addon domain in cPanel, you may sometimes encounter this error:

code
(XID xxxxx) A DNS entry for the domain "exampleaddon.com" already exists.

This message indicates that cPanel has detected a conflicting DNS record for the domain you're trying to add -- even if it no longer appears in your account.


Why This Happens

This error usually appears due to:

  • An addon or parked domain that was previously created and not fully removed

  • A leftover DNS zone file in /var/named/

  • A stale reference in /etc/userdomains, /var/cpanel/userdata/, or named.conf

  • A partial DNS record from a previous account or subdomain


Step-by-Step Fix Guide

1 Search for Existing DNS References

Use the following commands:

bash
grep -Ri "exampleaddon.com" /var/named/
grep -Ri "exampleaddon.com" /etc/named.conf
grep -Ri "exampleaddon.com" /var/cpanel/userdata/
grep -Ri "exampleaddon.com" /etc/userdomains

If any results are found, proceed to remove them manually (with caution).


2 Remove the Zone File (If It Exists)

bash
rm -f /var/named/exampleaddon.com.db

And remove any references in the BIND configuration:

bash
sed -i '/exampleaddon.com/d' /etc/named.conf

3 Clean Up cPanel Internal References

Open the relevant cPanel user file:

bash
nano /var/cpanel/users/exampleuser

Remove any line like:

ini
XDNS1=exampleaddon.com

Then update user data cache:

bash
rm -f /var/cpanel/users.cache/exampleuser
/scripts/updateuserdatacache
/scripts/rebuilddnsconfig
/scripts/rebuildhttpdconf

4 Restart DNS Services

For PowerDNS:

bash
systemctl restart pdns

For BIND:

bash
rndc reload

5 Try Adding the Domain Again in cPanel

  • Navigate to cPanel > Domains > Create a New Domain

  • Enter exampleaddon.com

  • Set a unique document root

  • Proceed with creation


Pro Tips

  • Always remove addon domains via cPanel, not by manually deleting folders.

  • Before reusing a domain name, check for DNS leftovers.

  • Avoid using the same domain as a subdomain or parked domain elsewhere on the server.


Summary Checklist

Step Action
1 Search for DNS conflicts using grep
2 Delete old zone file and config entries
3 Clear cPanel user mappings and caches
4 Restart PowerDNS/BIND and Apache
5 Re-attempt addon domain creation via cPanel

This process ensures a clean environment for re-adding a previously removed or conflicting domain.

Was this article helpful?

Your answer helps us decide what to improve next.

Still need help? Open a support ticket and our team will reply.

Prefer an app? Add this site to your home screen.Get the app
Fixing the "A DNS entry for the domain already exists" Error When Adding an Addon Domain in cPanel - Knowledge Base