5

Ubuntu 14.04.

I am on a local domain, xxx.local. From the terminal I can use dig and host to lookup many names served from our local dns servers like zzz.yyy.xxx.local. When I type that same host name in both chrome and firefox, I get ERR_NAME_NOT_RESOLVED errors.

Why can't these browsers resolve these names?

6

Turns out it's a difference between the way chrome/firefox fetch names and the way dig/host fetch names.

Typical nsswitch.conf has this line:

hosts: files mdns4_minimal [NOTFOUND=return] dns

which should be changed to:

hosts: files dns mdns4_minimal [NOTFOUND=return]

and everything will then magically work.

  • Nice one. Spent quite some time on that – raam86 Mar 7 '16 at 9:15
  • You can upvote the question too, since it was the answer to that question that helped you. – Dev Null Mar 9 '16 at 1:59
  • Do you know why this fix works? – Ian Hunter May 6 at 20:14
  • It appears only firefox/chrome respected this line in the nsswitch.conf. Reading left-to-right, first "files" is checked, if not found, then ".local" domains against a local dns server (if configured), and if not found, then return (stop trying to resolve the name) via "[NOTFOUND=return]". This is the exact behavior of firefox/chrome. I had no local dns servers configured ("mdns4_minimal"), my main upstream dns serves the .local requests, and the original line aborts any .local resolution against primary dns servers ("dns"). The fix line searches primary "dns" if not found in /etc/host. – Dev Null May 8 at 18:43

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.