dots in cnames

Kevin Darcy kcd at daimlerchrysler.com
Wed Sep 6 01:00:31 UTC 2000


beetle bailey wrote:

> Say we have a server: hostname.sub.dom.ain and someone wanted to use
> www.hostname.sub.dom.ain (someone created a presentation making use of  that
> address).  Is there any reason I shouldn't create a CNAME for www.hostname
> in the zone file for sub.dom.ain pointing to hostname?  It seems like that
> should be a very bad thing to do, but I tried it and it works.

Having a CNAME of www.hostname.sub.dom.ain pointing to hostname.sub.dom.ain
doesn't violate the "CNAME and other data" rule, as long as no other records
exist for www.hostname.sub.dom.ain.

> Then again
> delegating a new subdomain for hostname.sub.dom.ain and adding an entry for
> www sounds like trouble as there's already a A record in sub.dom.ain for
> hostname.sub.dom.ain.  Could I get some input on this?  Thanks.

If you delegated hostname.sub.dom.ain and wanted to keep an A record for that
name, then you'd have to add the hostname.sub.dom.ain A record to the new zone
file. Once that was done, there'd be no problem creating a "www" CNAME in the
zone pointing to that A record, just as you might, e.g. create a
www.example.com CNAME pointing to the example.com A record. You'd only run into
problems going the other way, i.e. creating a www.hostname.sub.dom.ain A record
and then trying to point a hostname.sub.dom.ain CNAME to it -- in that case,
the CNAME would conflict with the SOA and NS records for the zone.


- Kevin




More information about the bind-users mailing list