How can I search multiple domains in resolv.conf?

Barry Margolin barmar at alum.mit.edu
Sat Jul 2 05:08:36 UTC 2005


In article <da4s7u$1o29$1 at sf1.isc.org>,
 Gregory Hicks <ghicks at cadence.com> wrote:

> > X-TN-Interface: 209.99.127.20
> > From: Barry Margolin <barmar at alum.mit.edu>
> > Subject: Re: How can I search multiple domains in resolv.conf?
> > Date: Fri, 01 Jul 2005 20:07:38 -0400
> > To: comp-protocols-dns-bind at isc.org
> > 
> > In article <da40gm$1mue$1 at sf1.isc.org>, needin4mation at gmail.com wrote:
> > 
> > > Hi,
> > > 
> > > in my resolv.conf I have
> > > 
> > > domain domain1.com domain2.com
> > > nameserver 192.168.20.61
> > > nameserver ...
> > > 
> > > It works.  But is this correct?  I couldn't find it on the man page 
> or
> > > anywhere else.  Thanks.
> > 
> > You can only put one domain after "domain".  If you want multiple 
> > domains, use "search" instead:
> > 
> > search domain1.com domain2.com
> 
> But if you do this, remember that whichever directive (search/domain)
> comes second is the one that is used.  The other is ignored.

That's why I said "instead" rather than "in addition to".  There's no 
reason to have both in the resolv.conf file, since one will be ignored.  
So rather than try to remember whether it uses the first or the second, 
just get rid of the one you don't want.

-- 
Barry Margolin, barmar at alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***



More information about the bind-users mailing list