resolv.conf format

Cricket Liu cricket at
Sun Oct 27 23:20:41 UTC 2002

joe wrote:
>   What is the correct format for the /etc/resolv.conf file
> on a primary DNS? Currently I have the following:
> domain
> nameserver
> nameserver
> search
> Everything seems to work ok this is more of a
> what's required/missing question. Is it better to
> use the locahost ( address instead?

With a modern TCP/IP stack, it doesn't really matter.

> Is the search necessary if the domain statement
> is there, seems like overkill.

No, you just need one.  "search" gives you both an explicit search
list and a local domain name, while "domain" gives you just a local
domain name.  But the search and domain directives you're using
are equivalent.

> Finally if a resolver
> looks up say "" would the domain
> statement above be needlessly appended to the
> query ( resulting in
> longer/useless query times?

Only if you're using an older (pre-BIND 4.9) resolver.


Men & Mice
DNS Software, Training and Consulting

The DNS and BIND Cookbook, available now!

More information about the bind-users mailing list