Proper use of CNAME

Mark Andrews Mark_Andrews at isc.org
Mon Sep 19 22:39:16 UTC 2005


> At 7:33 AM -0700 2005-09-19, dwok wrote:
> 
> >  companyname1.com CNAME www.companyname.com
> >
> >  companyname1.net CNAME www.companyname.com
> >  companyname2.com CNAME www.companyname.com
> >  companyname2.net CNAME www.companyname.com
> >
> >    Is this the correct use of a CNAME record? Thank you in advance for
> >  any advice or suggestions.
> 
> 	No, you can't do it this way.  You have to do it the other way around.

	Brad that just causes another "CNAME and other data" error
	otherwise known as multiple CNAMES.

	What Brad is trying to say is that you can't use a CNAME
	at a delegation point.  You would have a CNAME and a NS
	RRset and a SOA RR.  You would break the restriction from
	RFC 1034 below.  You need to use address records at delegation
	points.

	If browsers vendors got together and added support for SRV
	records you could use those.

	_http._tcp.companyname.com SRV 0 0 0 www.companyname.com
	_http._tcp.companyname1.com SRV 0 0 0 www.companyname.com
	_http._tcp.companyname1.net SRV 0 0 0 www.companyname.com
	_http._tcp.companyname2.com SRV 0 0 0 www.companyname.com
	_http._tcp.companyname2.net SRV 0 0 0 www.companyname.com

	You can do the following however.

	www.companyname1.com CNAME www.companyname.com
	www.companyname1.net CNAME www.companyname.com
	www.companyname2.com CNAME www.companyname.com
	www.companyname2.net CNAME www.companyname.com
 
	From RFC 1034.

            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.

	Mark

> -- 
> Brad Knowles, <brad at stop.mail-abuse.org>
> 
> "Those who would give up essential Liberty, to purchase a little
> temporary Safety, deserve neither Liberty nor Safety."
> 
>      -- Benjamin Franklin (1706-1790), reply of the Pennsylvania
>      Assembly to the Governor, November 11, 1755
> 
>    SAGE member since 1995.  See <http://www.sage.org/> for more info.
> 
> 
--
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