Host Header Site

Mark Andrews Mark_Andrews at isc.org
Thu Jul 7 22:46:37 UTC 2005


> In BIND 9 I thought it was illegal to use a CNAME for the main record
> (domain1.com) and any subdomains (www.domain1.com).  My BIND does complain
> about this.  In BIND 4 this was just overlooked, but once we migrated to 9
> it became a problem.
> 
> Illegal Example:
>                 IN        CNAME        www.domain2.com
> www        IN        CNAME        www.domain2.com
> ftp            IN        CNAME        www.domain2.com

	No.  Only a CNAME where other data exists is illegal. In
	the above example ftp and www exist by themselves.  Note two
	or more CNAMEs are other data for each other.

RFC 1034.

The domain system provides such a feature using the canonical name
(CNAME) RR.  A CNAME RR identifies its owner name as an alias, and
specifies the corresponding canonical name in the RDATA section of the
RR.  If a CNAME RR is present at a node, no other data should be
present; this ensures that the data for a canonical name and its aliases
cannot be different.  This rule also insures that a cached CNAME can be
used without checking with an authoritative server for other RR types.

 
> Chris
> 
> 
> "Chris" <chris at nospam.datafoundry.com> wrote in message
> news:dajq5f$2ovc$1 at sf1.isc.org...
> >
> > "Brad Knowles" <brad at stop.mail-abuse.org> wrote in message
> > news:daisa4$vse$1 at sf1.isc.org...
> > > At 2:24 AM -0400 2005-07-07, Vinny Abello wrote:
> > >
> > >>  It doesn't matter how you setup the record pointing to the web
> > >>  server.
> > >
> > > Actually, it does matter.  The name has to resolve directly to
> > > the IP address.  If you use a CNAME record instead, most browsers and
> > > proxies will change the name that is being asked for to match the
> > > "canonical name" that they've been given.  If you give them an IP
> > > address instead, they go ahead and use the original name as provided.
> > >
> >
> > Really? We have hundreds of hosted web sites using a CNAME to the name of
> > the hosting server and it's always worked just fine.
> >
> > I have no doubt that using an A record is preferred but when you have
> > hundreds of domains pointing at a server and then you change the IP
> address
> > of the server only having to change the A record for the CNAME is
> preferred
> > to having to edit hundreds of zone files.  I've never seen the use of a
> > CNAME affect the ability to connect to a web server virtual and there are
> > plenty of popular web sites using CNAME's.
> >
> > Chris.
> >
> >
> >
> >
> 
> 
> 
--
Mark Andrews, ISC
1 Seymour St., Dundas Valley, NSW 2117, Australia
PHONE: +61 2 9871 4742                 INTERNET: Mark_Andrews at isc.org



More information about the bind-users mailing list