CNAME or A record?

Lightner, Jeff JLightner at water.com
Wed Sep 28 14:54:23 UTC 2011


Right – for simple domains I think having separate A records is best as I wrote.  Many more complex domains (do digs on www.google.com<http://www.google.com/>, www.yahoo.com<http://www.yahoo.com/> and www.microsoft.com<http://www.microsoft.com/>) use CNAME records but often enough it is because they aren’t actually using a www.example.com<http://www.example.com/> pointing directly to example.com but rather to other servers in their domains.






________________________________
From: Ben Croswell [mailto:ben.croswell at gmail.com]
Sent: Wednesday, September 28, 2011 10:48 AM
To: feralert
Cc: bind-users at isc.org; bind-users at lists.isc.org; Lightner, Jeff
Subject: Re: CNAME or A record?


Either is fine. Using the cname would require a single update if your ip changes, but prevents other records at the same level. So you couldn't attach mx for instance at example.com<http://example.com> and www.example.com<http://www.example.com> if you wanted to.

Neither is wrong and both have pros and  cons

-Ben Croswell
On Sep 28, 2011 10:43 AM, "feralert" <feralert at gmail.com<mailto:feralert at gmail.com>> wrote:
> Thanks Jeff,
>
> But I really only wrote that as an example :) . The real question is
> what is best or what is recommended, two A RR (one for domain, one for
> www) or a single A RR for domain and a CNAME RR for www, is one way
> better than the other or can I choose either way?
>
> Cheers!,
> Fred.
>
>
>
> On Wed, Sep 28, 2011 at 4:30 PM, Lightner, Jeff <JLightner at water.com<mailto:JLightner at water.com>> wrote:
>> If you set your SOA properly to use "@" (which means "this zone") your A records should be:
>>
>> domain.com<http://domain.com>.             A       1.1.1.1
>> www                     A       1.1.1.1
>>
>> The SOA should append the "domain.com<http://domain.com>" to every record not terminated by a dot so that "www" is read as "www.domain.com<http://www.domain.com>".  Similarly you put a dot at the end of domain.com<http://domain.com> A record to prevent it from being appended and read as domain.com.domain.com<http://domain.com.domain.com>.
>>
>>
>>
>>
>>
>> -----Original Message-----
>> From: bind-users-bounces+jlightner=water.com at lists.isc.org<mailto:water.com at lists.isc.org> [mailto:bind-users-bounces+jlightner<mailto:bind-users-bounces%2Bjlightner>=water.com at lists.isc.org<mailto:water.com at lists.isc.org>] On Behalf Of feralert
>> Sent: Wednesday, September 28, 2011 10:20 AM
>> To: bind-users at isc.org<mailto:bind-users at isc.org>
>> Subject: CNAME or A record?
>>
>> Hi all,
>>
>> I'm sure this has been asked trillions of times but since I couldn't
>> find any concrete answer/reference in google I am asking you guys in
>> this list. Sorry if anyone thinks this a dumb question or something
>> very obvious.
>>
>> The thing is that i want users redirected to 'www.domain.com<http://www.domain.com>' even
>> when they just type the domain name 'domain.com<http://domain.com>'.
>> In order to do so I am not sure if its best to have one A RR for each
>> or have an A RR for the domain and a CNAME RR pointing to 'domain.com<http://domain.com>'
>> for 'www.domain.com<http://www.domain.com>'.
>>
>>
>> domain.com<http://domain.com>           A            1.1.1.1
>> www.domain.com<http://www.domain.com>   A            1.1.1.1
>>
>> OR
>>
>> domain.com<http://domain.com>           A            1.1.1.1
>> www.domain.com<http://www.domain.com>   CNAME  domain.com<http://domain.com>
>>
>>
>> Any help appreciated.
>>
>>
>> Thanks,
>> Fred
>> _______________________________________________
>> Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list
>>
>> bind-users mailing list
>> bind-users at lists.isc.org<mailto:bind-users at lists.isc.org>
>> https://lists.isc.org/mailman/listinfo/bind-users
>>
>>
>>
>>
>> Athena(r), Created for the Cause(tm)
>> Making a Difference in the Fight Against Breast Cancer
>>
>> ---------------------------------
>> CONFIDENTIALITY NOTICE: This e-mail may contain privileged or confidential information and is for the sole use of the intended recipient(s). If you are not the intended recipient, any disclosure, copying, distribution, or use of the contents of this information is prohibited and may be unlawful. If you have received this electronic transmission in error, please reply immediately to the sender that you have received the message in error, and delete it. Thank you.
>> ----------------------------------
>>
>>
> _______________________________________________
> Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list
>
> bind-users mailing list
> bind-users at lists.isc.org<mailto:bind-users at lists.isc.org>
> https://lists.isc.org/mailman/listinfo/bind-users





Athena®, Created for the Cause™

Making a Difference in the Fight Against Breast Cancer



---------------------------------
CONFIDENTIALITY NOTICE: This e-mail may contain privileged or confidential information and is for the sole use of the intended recipient(s). If you are not the intended recipient, any disclosure, copying, distribution, or use of the contents of this information is prohibited and may be unlawful. If you have received this electronic transmission in error, please reply immediately to the sender that you have received the message in error, and delete it. Thank you.
----------------------------------


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/bind-users/attachments/20110928/63242ff3/attachment-0001.html>


More information about the bind-users mailing list