Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

We are trying to move all our websites we host to CNAMES as we are planning on moving servers in the new year and would like the ability to move some clients to one server and other clients somewhere else. We were planning on giving clients a unique CNAME which we can then change at a later date. (We have other reasons for doing this now but that is the main one)

We have been testing out this theory with a few of our own domains and it seemed to be fine. However when checking the MX records on a domain I got the CNAME value back rather than the MX record.

Sadly all of these domains are done via control panels, but I am guessing they are just writing zone files for me.

I want to create 2 CNAMEs for the IN CNAME
www          IN CNAME

The MX record is something like the following:  IN MX 10

We have an A record for


host -t mx

Returns the CNAME value rather than the mx record.

Is this expected behaviour?

I have managed to get the above configuration working with the control panel, but not sure if that is more luck than anything.

share|improve this question
This is a common question and has been asked many times before. See this link for an example:… – Russell Heilling Dec 7 '09 at 16:11
I did spend a little while looking for an answer but couldn't figure out if I was doing something different. Especially as it is working fine with one domain provider. I have my answer so that is cool and hopefully it will be of some use to someone. – johnwards Dec 7 '09 at 18:02

3 Answers 3

up vote 27 down vote accepted

This is a common error. You cannot use a CNAME RR for your root domain (e.g. and define additional resource records for the same zone.

See Why can't I create a CNAME record for the root record? and RFC1034 section 3.6.2 for details:

If a CNAME RR is present at a node, no other data should be present; this ensures that the data for a canonical name and its aliases cannot be different.

share|improve this answer
RFC2181 Section 10.1 is also relevant in that in reinforces the above. – Håkan Lindqvist Mar 6 at 22:56

RFC2181 section 10.3 says you can't point your MX record to a CNAME:

The domain name used as the value ... of a MX resource record must not be an alias.

share|improve this answer
That isn't really the scenario that the question is about, though? – Håkan Lindqvist Mar 6 at 22:57

You can use a CNAME on the root of the domain, however, those MX records must also be configured on the host record, so if you have configured on the zone for, and the root of is CNAME to, you must also make sure that is configured on that CNAME host; if not, all mail will be lost!

share|improve this answer
The problem is, as per RFC1034, "if a CNAME RR is present at a node, no other data should be present" -- since the root needs to have NS records (to be useful, anyways), there will always be other data, which violates this section of the RFC. – Doktor J Sep 30 '13 at 23:05
In my opinion the answer is correct, except that the MX record should be instead on the CNAME host (not also). – Alexander Taubenkorb Aug 13 at 5:26

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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