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

I want to point www.example.com or example.com to abc.example2.com.

In my cname zone settings for example.com, I have added a cname as follows:

name: www.example.com type: cname value: abc.example2.com

and so when I visit www.example.com it shows me the content of abc.example2.com which is absolutely correct. But when I visit example.com (without www or any other sub domain), it's not working. I even tried adding a record set as follows:

name: example.com type: cname value: abc.example2.com

But it gives me the following errors in 2 different DNS hosting websites: Route 53

RRSet of type CNAME with DNS name example.com. is not permitted at apex in zone example.com.

DYNDNS

CNAME cannot be created with label that is equal to zone name or in use for another record type.

Now, how can I achieve when visiting example.com it should show the content of abc.example2.com ?

share|improve this question

1 Answer 1

up vote 5 down vote accepted

When a label (name) is a CNAME, no other records are allowed for it. so you can't have something like:

www.example.com  A     1.2.3.4
www.example.com  CNAME test.example.com.

The effect of this, is that you can never have a CNAME for the bare example.com domain, as there are always other records for it: at least the SOA record and one or more NS records and usually one or more MX records. So this must be an A record instead.

What I usually do is go the other way around: make www.example.com a CNAME for example.com.

share|improve this answer
    
This worked, thanks a lot. –  Nikhil Rao Mar 30 '13 at 4:04

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.