domain names not resolving

Kevin Darcy kcd at
Thu Mar 22 22:36:12 UTC 2007

Jeff Lasman wrote:
> On Wednesday 21 March 2007 02:14 am, Lucien GENTIS wrote:
>> It could be a problem in case of a host which should use this DNS
>> server for name resolving
>> and have "dns, files" in its nsswitch.conf.
>> Wouldn't any call to localhost be resolved to instead
>> of ?
> Notice the lack of trailing dot on "localhost"; the nameserver will 
> return only for calls to "".  
> While many zonefiles continue to have a localhost.<domain> construct 
> I'm not sure that anything ever uses it, even if anything ever did.
>>>> In addition, if ns0 corresponds to ,
>>>> I think www and mail must have CNAME records instead of A record
>>>> since they correspond to the same IP address.
> There are almost no advantages to using CNAME to point to a field in the 
> same zone (the only advantage is that you'll only have to change the 
> IP# once if/when you ever have to change the IP# in the zonefile), and 
> one major disadvantage; every lookup for (for example www) becomes two 
> lookups.
No, only 1 query is necessary: both the CNAME and the associated A 
record(s) will be returned in the Answer Section of the response.

Another big advantage of using CNAMEs, even in the same zone, is that if 
you have only 1 "official" A record for any given address, with all 
other references being CNAMEs to that name, then there is zero ambiguity 
about where the reverse record for the address should point.

                                 - Kevin

More information about the bind-users mailing list