Cpanel already has a SOA record. You may not mix CNAME records

When using the Cpanel zone editor, I got this error when trying to add a CNAME for example.com, why?

example.com. already has a SOA record. You may not mix CNAME records with other records for the same name

Cpanel lets you create a CNAME on www.example.com, this is valid, however a CNAME on example.com (the primary domain) is not valid.

Why you’re wondering.  The answer is a CNAME record can only exist on a zone when no other record type exists, and by default your zone has to have an SOA and NS records and hence you’ll get the error message every time because of the conflict.

Now if Cpanel allowed you to create an ALIAS record it would be the correct way of doing so, however Cpanel doesn’t allow that yet.

So you’re wondering is there an alternative way to make this work?

This is what I did.

#1 Setup the domain example.net under Aliases on my account example.com

#2 Now go back into Aliases and edit example.net and set  Redirects To www.example.com

#3 Now go into your Zone Editor settings and set your CNAME for www.example.com to the desired destination.

You’re non-www domain redirects to www, and that www points to the CNAME.

That seem to solve the issue of creating an CNAME which covered both www and non-www urls for an account.