How to add more DNS servers to Wi-Fi interface on Mac

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 ( and to Wi-Fi network interface on Mac:

  1. 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:
  2. Select the WiFi interface in left pane and then click on advanced settings button as shown below:
  3. Click on DNS tab to Select DNS settings. Then click on plus icon as shown below to add more DNS server.
  4. Add public Google DNS servers ( and 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.
  5. Once IP addresses are entered, click ok and then click Apply button to ensure changes are applied.
  6. 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.

    Note the presence of entries and

Share this article: share on Google+ share on facebook share on linkedin tweet this submit to reddit


Click here to write/view comments