How to Fix the "A DNS Entry for 'domain_name' Already Exists" Error in cPanel

When adding an addon domain in cPanel, you might encounter the following error message:

“A DNS entry for 'domain_name' already exists. You must remove this DNS entry from all servers in the DNS cluster to proceed.”

Here's a step-by-step guide to resolving this issue:

Solution:

  1. Check Existing Domain Associations: Ensure the domain you are trying to add as an addon domain is not already configured as an addon, parked (alias), or subdomain on the same server.

  2. Verify DNS Entries: If the domain is not associated with the server as described above, the next step is to check the DNS zone file. For this, you’ll need root SSH access. Connect to the server via SSH and navigate to the DNS directory using the following command:

/var/named

    3. Remove the DNS Entry: If the DNS entry for the domain exists, you can remove it with this command:

/scripts/killdns domain_name

After executing the command, try adding the domain again. To confirm the DNS entry has been removed, use this command:

cat /var/cpanel/userdata/$user_name/main

    4. Check DNS Clusters: If the issue persists, check other servers within the same DNS cluster to ensure the domain is not listed there. If you find the DNS entry on another server, remove it. Verify that the domain is not already configured as an addon, parked domain, or subdomain before proceeding.

 

Important Note:

Before making any changes to the DNS zone file, it's crucial to create a backup to avoid any potential issues. Use the following command to create a backup:

cp -rp /var/named/domain_name.db /var/named/domain_name.db_backup

Following these steps should resolve the issue and allow you to successfully add your addon domain in cPanel.

 
 
Was this answer helpful? 283 Users Found This Useful (288 Votes)