Symptoms
When attempting to add an addon domain in a cPanel account, you receive an error similar to the following.
"subdomain.domain.tld" is already a dynamic DNS domain. Because this domain is a subdomain of “domain.tld”, you cannot create a DNS zone with that name.
Description
When an addon domain is created, a subdomain of the account's primary domain is created that the addon domain is parked on. The error occurs if the new subdomain has already been added as a Dynamic DNS domain. To add the domain, the Dynamic DNS domain must be removed first.
Workaround
- Access the server's command line as the 'root' user via SSH or "Terminal" in WHM.
- Locate the Dynamic DNS ID.
[root@server ~]cPs# ls /var/cpanel/webcalls/user/$pausername/
Please note that "$cpusername" must be replaced with the cPanel user's username.
syoucgwrdowfwnsuvwmsnubdxavjpgko - Use the UAPI to delete the Dynamic DNS domain.
[root@server ~]cPs# uapi --user=$cpusername DynamicDNS delete id='$ddnsid'
Please note that "$cpusername" and "$ddnsid" must be replaced with the cPanel user's username and the Dynamic DNS ID.
---
apiversion: 3
func: delete
module: DynamicDNS
result:
data:
deleted: 1
errors: ~
messages: ~
metadata: {}
status: 1
warnings: ~