CNAMES to different domain

Jim Howard howardj at psi.net
Wed Apr 26 19:21:00 UTC 2000


> -----Original Message-----
> From: Thomas Deliduka [mailto:thomas at neweve.com]
> Sent: Wednesday, 26 April 2000 14:55 h

> Wait, so what you're saying is that I could have the CNAME 
> defined for www
> like:
> 
> www.dialmattress.com. IN CNAME mattress.com.
> 
> But not for the straight domain.
> 
> I guess that defeats the point of having a CNAME point to a 
> separate domain.
> I wanted one place to change the IP if it ever changed rather than 100
> different files.

You _can_ however, point several domain entries in your named.conf
to the same zone file! I've been doing this for many dozens of 
domains, since I began using BIND 8.x a couple of years ago.

Ex:
	zone "mattress.com" {
		type master;
		file "matress.com.txt";	};
	zone "softmattress.com" {
		type master;
		file "matress.com.txt";	};
	zone "firmmattress.com" {
		type master;
		file "matress.com.txt";	};
	zone "bigfluffymattress.com" {
		type master;
		file "matress.com.txt";	};

Then always use @ within the zone file instead of the
domain for records that you want to exist for every domain
(and DON'T list an $ORIGIN at the top of the file!):

	@	in	soa	[...]
	@	in	ns	ns1.mattress.com.
	@	in	mx	10 mail.mattress.com.

use non-FQDN names for other records like:

	www	in	a	10.10.10.10

Then for entries that you only want to exist in the 
main zone, list them like this:

	mail.mattress.com.	in	a	10.20.20.20
	ns1.mattress.com.		in	a	10.30.30.30

The FQDN records will leave error messages in your logs
whenever the zone is reloaded on your primary,
but all other records will load properly.

-Jim H
----
Jim Howard           howardj at psi.net      jhoward at lyceum.net         
Sr Network Engineer                       404.248.1733 
Lyceum Internet, a PSINet Company         http://www.lyceum.net/   

My PGP Public Key: http://www.lyceum.net/~jhoward/pgp-key.txt 



More information about the bind-users mailing list