Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

DNS resolution appears to be inconsistent across OS X for no reason I can fathom.

$ ping example
PING ( 56 data bytes
64 bytes from icmp_seq=0 ttl=56 time=62.077 ms


$ nslookup example

** server can't find example: NXDOMAIN

http://example/ resolves in Firefox, yet:

$ dig example

fails. I am pointing at my router's default DNS (, as above). Pointing to other DNS servers does not appear to alter the above behaviour.

share|improve this question
up vote 3 down vote accepted

Check to see if your search domain is set. I just tried it (with my search domain set); ping and nslookup work. As does Safari and Firefox.

However, dig does not by default on MacOS X 10.6 use the search domain. To do that do:

dig +search example

And that will work correctly

share|improve this answer
I'm reasonably sure there's an issue with search domains in Snow Leopard. Firefox, Chrome, and Safari all have issues with URLs like intranet post-SL-upgrade for me. SL is the only variable, and the others who've upgraded @ work report the same thing. It's consistently inconsistent, too - some domains work, some don't, and the ones that do or don't are the same on different computers. – ceejayoz Jan 23 '10 at 4:03
Have accepted this solution, as manually setting the search domain caused the problem to disappear. This is the case even when the manually-set domain is identical to that already being set by the router! – jnic Feb 3 '10 at 12:23

Did you just upgraded to snow leopard? I had very similar issues. Resolved by removing all references to saved networks in the network preferences + login/keychain databases. Basically, you have to reset your entire name resolving subsystem.

share|improve this answer

The host is resolved via files or via other name service. See if it is in hosts. If not check /etc/nsswitch.conf file.

grep /etc/hosts
grep hosts /etc/nsswitch.conf
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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