Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

If I have an address record setup as follows...

www.mywebsite.com  111.1.1.1
*.mywebsite.com    111.1.1.2

and a CNAME setup as follows...

beta.mywebsite.com 111.1.1.3

Would pinging beta.mywebsite.com resolve to 111.1.1.2 or 111.1.1.3? How long does it take to refresh after changing.

share|improve this question

2 Answers 2

up vote 11 down vote accepted

a CNAME must point to an hostname not an IP address: http://en.wikipedia.org/wiki/CNAME_record

This is still confusing because it doesn't answer the title of the post. It just points out that a CNAME must point to a hostname.

Further, a record with the specific name requested will always override a wildcard or default record.

share|improve this answer
    
Ah! That explains everything :) –  digiguru May 17 '10 at 10:25

You appear to be mixing two things:

  1. As @Irosa says, a CNAME must point to a domain name, not an IP address

  2. With wildcard records, a more specific entry will always override the wildcard entry.

Furthermore, you can't have a CNAME and other resource records at the same name.

share|improve this answer
    
You can have an MX record pointing at the same name as a CNAME record. –  dunxd Sep 7 '12 at 13:51
    
@dunxd you can, although that used to be considered a configuration failure. –  Alnitak Sep 7 '12 at 13:53
    
Are you talking about not pointing an MX record at a CNAME record (e.g. mail MX cname; cname CNAME a-record; a-record A 12.12.12.12)? That won't work. But you could have mail MX a-record and cname CNAME a-record - that isn't broken. –  dunxd Sep 10 '12 at 19:32
    
@dunxd I meant the former, but it is permitted since RFC 2821. –  Alnitak Sep 10 '12 at 22:48
    
I didn't understand your answer - I thought you meant the latter and was responding to that. –  dunxd Sep 10 '12 at 23:11

Your Answer

 
discard

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.