I've recently (as in minutes ago) added a hostname and reverse (A and PTR) records for a hostname on my internal network, using a Bind DNS server. For some reason, i can both dig and nslookup this new name successfully, but ping and my GUI applications can not resolve the name.

I have attempted flushing the DNS cache on my local machine with dscacheutil -flushcache to no effect.

Here's an example of my session (names, IPs changed for security):

$ nslookup newbox.internal

Name:    newbox.internal

$ ping newbox.internal
ping: cannot resolve newbox.internal: Unknown host

WTF? Okay, I'm sure my DNS is set up correctly though:

$ dig newbox.internal

; <<>> DiG 9.8.3-P1 <<>> newbox.internal
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 33812
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 4, ADDITIONAL: 4

;newbox.internal.   IN  A

newbox.internal. 21600 IN   A

internal.       10800   IN  NS  dns001.internal.
internal.       10800   IN  NS  dss001.internal.
internal.       10800   IN  NS  dhdns001.internal.
internal.       10800   IN  NS  dhdns002.internal.

dns001.internal. 10800 IN   A
dns002.internal. 10800 IN   A
dhdns001.internal. 10800 IN A
dhdns002.internal. 10800 IN A

;; Query time: 1 msec
;; WHEN: Mon Jul  1 14:43:35 2013
;; MSG SIZE  rcvd: 245

Why does my system demonstrate this odd DNS resolver behavior?

As a side note, DNS works fine otherwise on my system. At this moment, this new hostname is the only one I'm having trouble resolving. My system is configured to use the DNS server as it's primary.


Killing mDNSResponder fixed this issue.. but why?

2 Answers 2


Killing mDNSResponder fixed this issue.. but why?

Because you flushed the local DNS cache!


A direct lookup command will query the DNS server directly, however the resolution mechanism for just about anything else is that mDNSResponder process you killed.

dscacheutil -flushcache is deprecated as per the KB.

  • I did not know that was the official method. Neat, and thanks for the pointer!
    – Mikey T.K.
    Jun 7, 2014 at 19:42

From man nslookup and man dig:


The nslookup command does not use the host name and address resolution or the DNS query routing mechanisms used by other processes running on Mac OS X. The results of name or address queries printed by nslookup may differ from those found by other processes that use the Mac OS X native name and address resolution mechanisms. The results of DNS queries may also differ from queries that use the Mac OS X DNS routing library.

man host has the same notice. ping however does not.

More information and possible solution here:

DNS lookups fail with e.g. `ping`, but work with `host`

You must log in to answer this question.

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