5

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

$ ping example
PING example.co.uk (80.94.32.224): 56 data bytes
64 bytes from 80.94.32.224: icmp_seq=0 ttl=56 time=62.077 ms

Yet:

$ nslookup example
Server:     10.20.20.1
Address:    10.20.20.1#53

** server can't find example: NXDOMAIN

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

$ dig example

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

3 Answers 3

3

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

2
  • 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, 2010 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, 2010 at 12:23
0

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.

-2

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 example.com /etc/hosts
grep hosts /etc/nsswitch.conf

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .