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 (8.8.8.8 and 8.8.4.4) 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:
    mac-wifi-menu-expanded-and-network-preference-highlighted
  2. Select the WiFi interface in left pane and then click on advanced settings button as shown below:
    mac-network-wifi-settings-advanced-hghlighted
  3. Click on DNS tab to Select DNS settings. Then click on plus icon as shown below to add more DNS server.
    mac-network-settings-dns-plus-highlighted
  4. Add public Google DNS servers (8.8.8.8 and 8.8.4.4) 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.
    mac-network-settings-google-dns-servers-added
  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.
    #
    nameserver 202.56.230.5
    nameserver 8.8.8.8
    nameserver 8.8.4.4
    

    Note the presence of entries 8.8.8.8 and 8.8.4.4.

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

Comments

Click here to write/view comments