Published on

Gotcha - the .local domain is special


Noticed some very strange behaviour when looking at webpages within a new domain set up internally for a company project.

At first, it looked like the DNS was failing, ping came back with :

ping : unknown host web.internal.local

However, dig web.internal.local returned the correct result. Very strange.

More strange was that the "Fedora Server" also on the same network was returning the correct results for both, and both had the same (NetworkManager generated) entries in /etc/resolv.conf.


Have a look in the /etc/nsswitch.conf file, in order to see what the DNS resolution order is.

Failing desktop machine :

grep hosts /etc/nsswitch.conf
#-> hosts:      files mdns4_minimal [NOTFOUND=return] dns myhostname

Working server machine :

grep hosts /etc/nsswitch.conf
#-> hosts:      files dns myhostname


Leads to the solution (helped by this helpful post) :

yum remove nss-mdns

The base issue being that .local domains are a special case for mdns.

If the company had chosen .company or .internal (or even .whatever) they would have been in the clear. Bad luck to have made such a reasonable choice, which turned out to have been someone else's special case...