1

I am trying to point a subdomain to a different server. The A Record changed without issue but the CNAME won't save in cPanel.

I get this error:

Error: sub.domain.com. already has a A record. You may not mix CNAME records with other records for the same name.

How do I fix this?

1
  • 2
    If you are setting the A record to the other server's IP address, what are you trying to set the CNAME record to? – MrWhite Nov 5 '20 at 17:41
3

A and CNAME both are types of DNS records, that can be applied to a domain name.

But they are mutually exclusive:[1]

  • A resolves a domain name query to an IP address,
  • CNAME resolves it to an other domain name.

So if you are ”trying to point a subdomain to a different server“ it depends on you hosting situation if it's better to have DNS queries resolved directly to the new server's IP by setting the subdomain's A record to the new IP or "redirect" the DNS lookup by setting CNAME to point to a domain name of the new server (which gets DNS-resolved iteratively).[2]

(I certainly have no crystal ball, but person asking the question may confuse a CNAME record to be some kind of alias naming mechanism.)



  1. Actually, a domain name having a CNAME attached must not have any other resource record associated.
  2. NB: In the case of HTTP requests to the mentioned subdomain, the host: header will not change during a CNAME resolution.
2

The error message strongly indicates that you already have an A record for the subdomain.

You need to delete this A record before adding the CNAME record as the 2 record types are incompatible with each other.

1
  • 1
    So if the subdomain host has instructions for adding A records and CNAME records, you only need to do one or the other. You can't do both. – Stephen Ostermiller Nov 5 '20 at 10:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.