When you are using WiFi or wired network using home broadband or mobile hotspot, you are assigned a default DNS server. It sometimes may be slow. It may be better to add few DNS server as backup DNS server in you Wifi or wired network interface. Here are quick steps to add Google public DNS servers (188.8.131.52 and 184.108.40.206) to Wi-Fi network interface on Mac:
First open the Network preferences by clicking on Wifi icon on top menu toolbar and then clicking on “open network preferences” sub menu as shown below:
Select the WiFi interface in left pane and then click on advanced settings button as shown below:
Click on DNS tab to Select DNS settings. Then click on plus icon as shown below to add more DNS server.
Add public Google DNS servers (220.127.116.11 and 18.104.22.168) after the already existing DNS server. Note that the order of these DNS servers does matter and it is better to keep the new DNS servers after the already existing servers. You can also use minus icon to remove the unwanted DNS server later if needed. You can also optionally change the order of these DNS servers by dragging the DNS IP addresses in UI.
- Once IP addresses are entered, click ok and then click Apply button to ensure changes are applied.
Run to following command to list the DNS servers set on you machine.
$ cat /etc/resolv.conf # # Mac OS X Notice # # This file is not used by the host name and address resolution # or the DNS query routing mechanisms used by most processes on # this Mac OS X system. # # This file is automatically generated. # nameserver 22.214.171.124 nameserver 126.96.36.199 nameserver 188.8.131.52
Note the presence of entries 184.108.40.206 and 220.127.116.11.