Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Mar 2000 16:18:06 -0800
From:      Doug Barton <Doug@gorean.org>
To:        "Dan O'Connor" <dan@jgl.reno.nv.us>
Cc:        FreeBSD Questions List <freebsd-questions@FreeBSD.ORG>
Subject:   Re: CNAME vs A records (clarification)
Message-ID:  <38CC33BE.EBB04737@gorean.org>
References:  <032b01bf8c7f$1e0f07e0$0200000a@danco.home>

next in thread | previous in thread | raw e-mail | index | archive | help
Dan O'Connor wrote:
> 
> > There is no such concept as "alias" in DNS. Erase it from your mind. A
> >records point hostnames to IP addresses. CNAME records point hostnames
> >to other hostnames. Except for very rare and temporary cases you
> >shouldn't use CNAME's at all, especially if you don't really understand
> >all of the implications.
> 
> So this is more proper?
> 
>     mydomain.com    A    123.45.67.890
>     www.mydomain.com    A    123.45.67.890
> 
> instead of:
> 
>     mydomain.com    A    123.45.67.890
>     www.mydomain.com    CNAME    mydomain.com

	That depends on what you're trying to accomplish. I use exactly that
construction for some of my private web sites because I want all of the
records that apply to domain.com to also apply to www.domain.com,
including MX records, etc. But if all you need is name -> IP mapping,
the first is much better. I also make a habit of only using A records
for heavily hit commercial sites because it saves you one complete
lookup cycle to get to the info you want. 

> I've read the O'Reilly book, but am still fuzzy. What are "all of the
> implications" that might fubar you if you use CNAME's?

	Lots of things. To go into all the details is beyond the scope of this
list. Some common errors that people make are chaining CNAME's, pointing
MX/NS records at a CNAME, and not understanding that ALL of the records
that apply to the canonical name will also apply to the CNAME, like MX,
etc. 

	Basically my point is that you can get yourself into a lot of trouble
very quickly using CNAME's, so you're infinitely better off avoiding
them if at all possible, especially when you are first learning DNS.

HTH,

Doug
-- 
"Welcome to the desert of the real." 

    - Laurence Fishburne as Morpheus, "The Matrix"


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?38CC33BE.EBB04737>