Symptoms

When adding an addon domain or subdomain in your cPanel, you get an error similar to the following.

There is already a DNS entry for the domain “subdomain.domain.tld”. at /usr/local/cpanel/Cpanel/Admin/Modules/Cpanel/subdomain.pm line 176.

 

Description 

This error occurs when your server already has a DNS record for the subdomain. You should ensure that the DNS record file is removed.

 

Workaround

  1. Log into WHM as the ‘root’ user.
  2. Navigate to "Home / DNS Functions / Edit DNS Zone."
  3. Click the "Manage" button to the right of the domain name.
  4. Click the "Delete" button to the right of the record to delete.
  5. Confirm that you want to delete the record by clicking the "Continue" button.

 

Additional resources

DNS Zone Manager: Delete a DNS zone record