Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

3 Answers 3

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

Your Answer

 
discard

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.