From owner-freebsd-questions@FreeBSD.ORG Fri Oct 23 15:12:34 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6DCC3106568F for ; Fri, 23 Oct 2009 15:12:34 +0000 (UTC) (envelope-from dave.list@pixelhammer.com) Received: from smtp2.tls.net (smtp2.tls.net [65.124.104.105]) by mx1.freebsd.org (Postfix) with ESMTP id 27F178FC14 for ; Fri, 23 Oct 2009 15:12:33 +0000 (UTC) Received: (qmail 75075 invoked from network); 23 Oct 2009 15:12:33 -0000 Received: by simscan 1.2.3 ppid: 75030, pid: 75072, t: 0.2223s scanners: attach: 1.2.3 spam: 3.2.1 X-Spam-Checker-Version: SpamAssassin 3.2.1 (2007-05-02) on smtp-2.tls.net X-Spam-Level: X-Spam-Status: No, score=0.2 required=7.0 tests=ALL_TRUSTED,TVD_RCVD_IP autolearn=disabled version=3.2.1 Received: from 208-70-44-208.bb.hrtc.net (HELO ?192.168.1.46?) (ldg@tls.net@208.70.44.208) by ssl-smtp2.tls.net with ESMTPA; 23 Oct 2009 15:12:33 -0000 Message-ID: <4AE1C7CA.7030905@pixelhammer.com> Date: Fri, 23 Oct 2009 11:12:10 -0400 From: DAve User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) MIME-Version: 1.0 To: 'User Questions' References: <4AE1A1D0.8060402@pixelhammer.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: DNS Question X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Oct 2009 15:12:34 -0000 Sean Cavanaugh wrote: > > Date: Fri, 23 Oct 2009 08:30:08 -0400 > > From: dave.list@pixelhammer.com > > To: freebsd-questions@freebsd.org > > Subject: DNS Question > > > > Good morning. > > > > I have been asked by my co-workers and sales why I always create a A > > record for new domains we host instead of a CNAME. > > > > The issue I run into lately with some domains is that a client has a > > website with a industry host such as frank.relator.com and he wants to > > have DNS point www.frank.com to frank.relator.com with a CNAME. The > > client does not want an A record for frank.com. > > > > Somewhere, in a class far far away, I was taught a DNS zone had to have > > a A record to function properly. I can't seem to locate anything in the > > RFCs. > > > > Am I wrong? > > > > > I think you are confusing basics of DNS records. you are partially > correct in that a DNS zone needs an initial A record to be able to > translate a name to an IP, but there is nothing wrong about setting up a > CNAME to point to a record in a different zone instead. you just cannot > do a zone that has a CNAME only that does not at some point to a valid A > record. CNAMEs are forwarders only whereas A records are actual lookups. > > for proper way to set this up.... > > The A record would be assigned for the main name that you want to > associate to an IP address. > The CNAME record just relates a different name to that original name. > this allows you to change the IP address of the server and only have to > update the original A record instead of every DNS record for that server. > > for small number of vhosts, this would not really be an issue, but > imagine if you were hosting a couple hundred vhosts from a single IP and > then had to change that IP because you switched your ISP. It would take > you a LONG time to update them if they were all A records, but only a > couple of seconds if you had it properly set up as CNAME's > > www.bobshosting.com A 192.168.0.1 > www.vhost1.com CNAME > www.bobshosting.com . > www.vhost2.com CNAME > www.bobshosting.com . > www.vhost3.com CNAME > www.bobshosting.com . > www.vhost4.com CNAME > www.bobshosting.com . > > > > -Sean All true, and I did not do a very good job of explaining it. My issue was that we have requests to use a CNAME for the domain record. Such as this. example.com CNAME otherdomain.com www.example.com CNAME otherdomain.com I was taught this was not good form, but allowed. I can deal with it. But what of having a SOA record for example.com, no A or CNAME record for the TLD example.com, only hosts such as www, ns1, ftp, etc. I tried it an it seems to work fine, but doesn't look proper to me. Then again I remember when CNAME were considered evil. DAve -- "Posterity, you will know how much it cost the present generation to preserve your freedom. I hope you will make good use of it. If you do not, I shall repent in heaven that ever I took half the pains to preserve it." John Quincy Adams http://appleseedinfo.org