Question

Guido Roeskens groeskens at bluewin.ch
Thu Jun 24 08:12:25 UTC 2004


Hello,

Jeff Lasman wrote:

>On Wednesday 23 June 2004 08:25 am, Christoph Galuschka wrote:
>
>  
>
>>I would like to set up some domains who return an IP-address
>>for www.domain.com and the same IP-address for
>>domain.com.
>>
>>Can somebody please tell me what to write in the zonefile.
>>    
>>
>
>I can think of two ways to do this.
>
>1) Create two A records; one for www.domain.com, and one for domain.com, 
>each resolving to the same IP#.
>  
>
That's the only sane way I can think of.

>2) Create an A record for domain.com and a CNAME record for 
>www.domain.com resolving to domain.com.
>
>  
>
this will have side-effects you may not like.
the entry www.domain.com will also have an SOA record, NS records and 
other records you set up
for domain.com
The best way is to always use A records
www.domain.com.      IN   A   127.0.0.1
ftp.domain.com.      IN   A 127.0.0.1
mail.domain.com.      IN   A   127.0.0.1

You can use CNAME to point from one host entry to another
ftp.domain.com.      IN   CNAME   www.domain.com.

>Okay, okay, there's a third way; exactly the inverse of #2; let's call 
>it #3 <smile>.
>
>  
>
Illegal, as already pointed out.
CNAME's cannot have any other data assigned to the RR

Guido




More information about the bind-users mailing list