From owner-freebsd-questions Sun Mar 12 16:18:13 2000 Delivered-To: freebsd-questions@freebsd.org Received: from dt051n0b.san.rr.com (dt051n0b.san.rr.com [204.210.32.11]) by hub.freebsd.org (Postfix) with ESMTP id 9338F37C03D for ; Sun, 12 Mar 2000 16:18:09 -0800 (PST) (envelope-from Doug@gorean.org) Received: from gorean.org (doug@master [10.0.0.2]) by dt051n0b.san.rr.com (8.9.3/8.9.3) with ESMTP id QAA74625; Sun, 12 Mar 2000 16:18:06 -0800 (PST) (envelope-from Doug@gorean.org) Message-ID: <38CC33BE.EBB04737@gorean.org> Date: Sun, 12 Mar 2000 16:18:06 -0800 From: Doug Barton Organization: Triborough Bridge & Tunnel Authority X-Mailer: Mozilla 4.72 [en] (X11; U; FreeBSD 4.0-CURRENT-0312a i386) X-Accept-Language: en MIME-Version: 1.0 To: "Dan O'Connor" Cc: FreeBSD Questions List Subject: Re: CNAME vs A records (clarification) References: <032b01bf8c7f$1e0f07e0$0200000a@danco.home> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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