Search code examples
macosdnsroutersystem-preferences

When is a secondary DNS server used?


On our router we have the primary DNS set to a local IP, which is running Windows Server 2008 and the built in DNS server. We use this to resolve domains to local servers, if the domain is not founds locally we have forwarders set up to query external name servers.

The secondary DNS on the router is set to our ISP's primary DNS, incase the local DNS server is down.

The mac clients in our office pick up the DNS servers correctly from the router but it seems very random as to what DNS server it uses. For example, a local site would load up but some of the images would not. If I hard coded my DNS address to be the local DNS server everything would work fine.

So my question is, when would a mac client use the secondary DNS server? I though it'd only use it if the primary DNS was unavailable?

Thanks!


Solution

  • I googled this article which explains newer MacOS DNS search order. And this one which explains how to tweak it to obtain results that you desire.

    Though the general idea is that it was never intended (in any OS) that first server is the one used and the second one is a backup. ( Even on windows, if first server for some reason doesn't answers very quickly, the second one will be queried.) It's wiser to regard server query order as unspecified.