How can I configure the DNS server in the network preferences with 8.8.8.8 (Google DNS) for my Mac but have it default to local network DNS servers in case Google's DNS server is not reachable from a LAN?
MacOS – No DNS resolution if custom configured DNS server is not reachable – how to fallback to default DNS
dnsmacos
Related Question
- MacOS – Name resolution is using proxy server over the local DNS server
- Configured Airport as Bridge and use OS X Server for DHCP and DNS, no Internet
- MacBook – How to set custom DNS settings
- MacOS – DNS Resolution Fails for ping and curl, but not dig
- How to configure DNS now that OS X Server doesn’t support it
- How to add locally hosted DNS server while preserving default LAN DNS
Best Answer
First go to the terminal to find out what's your current DNSs using the command:
Then,
in your network settings, under "Advanced"
enter:
If Google DNS won't work it will fallback to google other DNS server. If that fails too the fallback will be your local DNSs.