Fix for cPanel DNS Error: The DNS zone file is invalid. (Line 55: <subdomain name="">: CNAME and other data)</subdomain>
When trying to add a “base” (meaning just the subdomain) CNAME record to a newly added subdomain in cPanel, I received this error:
Error: The DNS zone file is invalid. (Line 55:
Claude Opus 4.6 (at the time of this writing) suggested the following:
This is a common DNS issue. The error “CNAME and other data” means you’re trying to add a CNAME record for a subdomain that already has another record type (like an A, MX, or TXT record) at the same name. DNS standards (RFC 1034) prohibit a CNAME from coexisting with any other record at the same node.
But I thought to myself, “this is a brand new subdomain, just added within cPanel, what does that mean? I already removed the template A record and matching CNAME record.”
Come to find out there was a “base” subdomain TXT DNS record that was added automatically for the subdomain, and I didn’t even see it since it was on the next page in the DNS records area.
Once I removed that TXT record, adding a CNAME for the base subdomain worked!