CNAME for main domain

Paul Vixie vixie at as.vix.com
Sun Nov 24 03:13:29 UTC 2002


gregoryj at hotpop.com (Gregory J.) writes:

> Is it valid to have the "main" (I call it that for inability to think
> of a better word) domain in a zone a CNAME?

no.

> This zone file for example:
> 
> $TTL 86400
> @	IN	SOA	ns1.domain.com. admin.domain.com. (
> 			2002112301	; Serial, YYYYMMDDXX
> 			3600		; Refresh, 1 hour
> 			1200		; Retry, 20 minutes
> 			2592000		; Expire, 1 month
> 			600 )		; Minimum, 10 minutes
> 	IN	NS	ns1.domain.com.
> 	IN	NS	ns2.domain.com.
> 	IN	CNAME	host1
> host1	IN	A	123.456.789.101
> 	IN	MX 10	host1
> 	IN	MX 20	host2
> host2	IN	A	123.456.789.102
> 	IN	MX 10	host2
> 	IN	MX 20	host1
> 
> Is the CNAME record correct? I set it up so that http://domain.com/
> points to host1, which serves the organization's Web site. I could
> have made it "IN A 123.456.789.101," but I didn't want to have two
> mappings to the same IP -- it's untidy for reverse DNS.

untidy though it is, putting an A RR there is the right answer, and
then you use a CNAME for "www".  so it could be

@   SOA   ...
    A     123.456.789.102
www CNAME @
-- 
Paul Vixie


More information about the bind-users mailing list