I setup my DHCP server to assign three DNS servers:

  • - my own internal DNS server for hosting private A records for my home network
  • - Open DNS
  • - Open DNS

My internal DNS server uses the Open DNS servers for forwarding The idea being that if my self hosted DNS server isn't availabe clients will just fall back to open DNS.

In Sonoma I have the three DNS servers and nslookup resolves my internal host, but I cannot ping or resolve internal hosts by name.

scutil --dns
DNS configuration

resolver #1
  search domain[0] : home
  nameserver[0] :
  nameserver[1] :
  nameserver[2] :
  if_index : 6 (en0)
  flags    : Request A records
  reach    : 0x00020002 (Reachable,Directly Reachable Address)
MBP:~ paul$ nslookup unifi

Name:   unifi.home
MBP:~ paul$ ping unifi
ping: cannot resolve unifi: Unknown host
MBP:~ paul$ ping unifi.home
ping: cannot resolve unifi.home: Unknown host

What gives?

  • If you remove home as a search domain, does it work? I think you need to use .local to signify a mDNS item (or at least you're not looking up). I believe there is no RFC for .home per this answer that seems well sourced. I haven't needed mDNS for my ubiquity setups, but there are some people who have reported various setups working if it doesn't just all work.
    – bmike
    Commented Jan 15 at 23:40
  • 2
    macOS doesn't treat its DNS server list as having any sort of priority order, it's just an unordered pool. So trying to use it like this just won't work. Your main options are to add entries to /etc/hosts, or create a file in /etc/resolver/ pointing .home queries only to the internal DNS server. See "In OS X, how can I prepend to the list of DNS servers obtained through DHCP?" over on superuser. Commented Jan 15 at 23:41
  • Gordon is correct - you have to choose your router DNS only if you plan to inject local values from there. I'm guessing you're not making any DNS entries and hoping it just all works, which for me is using .local on the Mac side and leaving the router alone. I have only the router for DNS on my networks so consider dropping the 2/3 ones?
    – bmike
    Commented Jan 15 at 23:48
  • I can’t use mdns because I have many apps in docker on one host. The easiest solution seemed to be to run my own dns with search domain specified so I can just reference them by name. I didn’t want it to be a single point of failure which is why I added secondary and tertiary dns. I guess I will have to remove them and only have one dns server Commented Jan 16 at 0:43
  • @PaulWieland You want your local DNS to be smart enough to forward lookups it can't resolve, not just send NXDOMAIN for them. Then you don't need the others. Commented Jan 16 at 22:10

1 Answer 1


Since macOS doesn't split DNS queries like other OS - I would simplify your problem by removing nameservers and from the picture and have only one DNS defined for macOS - the DNS and IP from your router.

Have it do any subsequent lookups against the two DNS servers on the 208.67.x.x network.

Your docker situation means mDNS may not be the fix that it is in my case. You may need more configuration, but let's make sure macOS can't work with only one DNS server to query.

  • 1
    Thank you! I changed DHCP server to assign (router) as the DNS provider. I then set my Unifi router up so that it queries first and then openDNS second. My first tests seem to work, but I need to do some more testing to be sure. Commented Jan 16 at 12:57
  • Wonderful @PaulWieland I didn’t know how to incorporate your DNS. So glad you could incorporate that on top of the router stack.
    – bmike
    Commented Jan 16 at 14:07

You must log in to answer this question.

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