Super User is a question and answer site for computer enthusiasts and power users. 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

In my home network I have a couple of Windows based PCs that have no known issues with DNS but with my OSX iMac I have problems resolving a couple of random domains. Some domains that I have problems with are:


Besides looking at the /etc/hosts file (which I think is fine) what should I check on the iMac for problems associated with DNS or what tools should I used to help diagnose the issue that I am facing?

Using the dig command I get:

; <<>> DiG 9.4.3-P3 <<>> @
; (1 server found)
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 3468
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

; IN    A


;; Query time: 86 msec
;; WHEN: Tue Apr 12 18:22:42 2011
;; MSG SIZE  rcvd: 65

After trying some of the suggestions I believe DNS is the wrong problem ... when I did a ping of this is what I got:

PING ( 56 data bytes
ping: sendto: No route to host
ping: sendto: No route to host
ping: sendto: No route to host
ping: sendto: No route to host

So this looks like the DNS is resolving but the route to host cannot be found? What is going on here?

share|improve this question

migrated from Apr 11 '11 at 2:53

This question came from our site for system and network administrators.

up vote 3 down vote accepted

The command line is going to be your friend. 1st you may not have a DNS issue at all. You need to determine that first. The best tool for this job is dig. Open Terminal and type

dig @

The components of this command:

dig          :   the command
@     :   this tells dig where to ask.  We are specifically asking a
                 known provider in this case Level3.  You could easily put
        (Google) or any other provider here.     :   the domain you wish to query for.

You will get back output like:

; <<>> DiG 9.7.2-P2 <<>> @
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 43699
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;          IN  A

**;; ANSWER SECTION:       118 IN  A**

;; Query time: 1 msec
;; WHEN: Mon Apr 11 01:51:12 2011
;; MSG SIZE  rcvd: 42

The ANSWER SECTION is the important part. If you get an answer then you know your iMac is fine and it can "get" access to that domain.

The next step is to replace the @ with the IP or hostname of your regular DNS server. This is typically provided to you by your ISP. If you get the same answer then you know DNS is not your problem and you can begin to look elsewhere. You also what to perform these tests a few times to make sure you are getting good response times. If you ever get:

;; connection timed out; no servers could be reached

Then you know that you are not getting back a response. If this happens intermittently you may notice it more on the iMac versus your windows machines because of caching. I have found in my experience Windows machines cache DNS responses longer than Macs.

share|improve this answer

To troubleshoot DNS problems on Mac OS X, you have to use both a traditional Unix DNS lookup tool like (pick one:) host,dig, and nslookup, as well as a modern tool that calls Mac OS X-specific DNS lookup APIs, such as dns-sd -Q.

The DNS lookup APIs that most Cocoa apps call get routed through the mDNSResponder daemon, which means if your GUI apps are having DNS lookup problems, dns-sd -Q will probably show you the same thing.

Traditional Unix DNS lookup tools use more traditional Unix DNS resolver code, which means they may be able to resolve things that Cocoa apps can't (and vice-versa).

If you can look something up with dig but not with dns-sd, then you could try killing the mDNSResponder daemon and letting launchd automatically relaunch it (I've found that HUPping mDNSResponder isn't always enough).

sudo killall mDNSResponder
share|improve this answer

Do you have any IP-blocking software or similar things installed on your iMac?

Also, try going into Preferences->Network->Advanced->DNS and reset your DNS entries; get rid of any extraneous ones.

If that doesn't work, try (temporarily) making a new account on your iMac, or log into another one, and see if you can access the websites from those.

share|improve this answer
No IP blocking that I am aware of ... – Wally Atkins Apr 12 '11 at 22:02

To test something, you could go to Preferences->Network->Advanced->DNS and add a DNS entry for Google's public DNS If that resolves the issue, then you will have to figure out what DHCP settings your router is using when handing out IP addresses and DNS info. If your router is getting it's DNS info from your ISP, then that could be your problem, maybe just a slow response. You don't have to use your ISPs DNS settings.

I often use to test, but primarily use Opendns for added control.

Hope that helps

share|improve this answer

You must log in to answer this question.

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