Multiple A or CNAME?

Bill Moseley moseley at best.com
Sat Jun 3 13:39:32 UTC 2000


I'm a bit confused about when to use a CNAME vs using multiple A records 
pointing to the same IP.

First a simple example,

Say my domain is example.com.  My web server is running on 
web.example.com (web is the name of the machine).

I want example.com, hal.example.com, and www.example.com to all resolve 
to the same IP.

So in the example.com zone file

@      1D IN SOA       @ root (
       [...]

       1D IN A     123.123.123.1               
hal    1D IN A     123.123.123.1
www    1D IN CNAME web

So it seems like www should be a CNAME, but I don't really grasp why it 
makes a difference.  In some ways it seems like "example.com" should be 
a CNAME for hal.example.com.

Is there any reason www couldn't also be an A name?

And then does it matter what the reverse lookup shows?  I assume it 
should return hal.example.com, and not simply example.com as that's just 
the domain (even though it resolves to an IP number).









-- 
Bill Moseley mailto:moseley at best.com
pls note the one line sig, not counting this one.



More information about the bind-users mailing list