1

When connecting to the Internet by default I get two lines in my /etc/resolv.conf file:

I'd like to know what exactly "search localdomain" means there.
I see that it's probably related to DNS but I'm not sure how and couldn't find sufficient information on that. I also don't understand why it's getting removed when I disconnect from the Internet - shouldn't it stay there?
I'm using Debian 9.1 with KDE.

3

man resolv.conf:

search

Search list for host-name lookup.

The search list is normally determined from the local domain name; by default, it contains only the local domain name. This may be changed by listing the desired domain search path following the search keyword with spaces or tabs separating the names. Resolver queries having fewer than ndots dots (default is 1) in them will be attempted using each component of the search path in turn until a match is found. (...)

localdomain here is your domain. When you make a DNS query with no dot (actually with fewer dots than the configuration value ndots), this domain is automatically added to your query. I.E. if you look up for foo, the actual DNS lookup will be for foo.localdomain.

  • The questioner also wanted to know why it was appearing and disappearing in that file. – JdeBP Aug 18 '17 at 15:51
  • @JdeBP Yes, in question 386790 – xhienne Aug 18 '17 at 16:20
  • Am I generating such DNS lookups when I enter search terms without a dot in Firefox ESR's address bar (for websearch and not for accessing local resources)? And do these DNS lookups in practice exit my LAN (wouldn't make sense as localdomain is local)? – mYnDstrEAm Aug 18 '17 at 18:00
  • @mYnDstrEAm 1. If your URL is http://single_word/, yes. Else, it really depends on the inner working of FF, it may try a lookup before a websearch. 2. Probably, AFAIK localdomain has nothing special. It depends of the DNS proxy embedded in your router and whether its domain has been set to localdomain too. – xhienne Aug 19 '17 at 8:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.