How to Change Your Mac's DNS Settings

Manage Your Mac's DNS - Gain Better Performance

OS X Network preference pane where DNS entries are stored
Add your DNS entries, one per line. Screen shot courtesy of Coyote Moon, Inc.

Configuring your Mac's DNS (Domain Name Server) settings is a pretty straightforward process. Even so, there are a few subtle nuances to be aware of that will help you get the most out of your DNS server.

You configure your Mac's DNS settings using the Network preference pane. In this example, we will configure the DNS settings for a Mac that connects via an Ethernet wired network. These same instructions can be used for any network connection type, including AirPort wireless connections.

What You Need

  • One or more DNS IP (Internet Protocol) addresses. IP addresses are usually assigned by your ISP (Internet Service Provider), although you are usually under no constraints to use the assigned name servers. Many individuals prefer to use publicly available DNS services, such as Open DNS or Google DNS, on the theory that publicly available DNS services may be faster than those supplied by a local ISP. In actuality, there is no hard and fast rule about which is faster. If you're not sure which DNS service to use, you can use Google's namebench application to test the speed of any DNS system
  • Administrative access to your Mac. You'll need an administrator password to make changes to the Network settings on your Mac. If your user account is the only user account on your Mac, then it is also the administrator account.

Configure Your Mac's DNS

  1. Launch System Preferences by clicking the 'System Preferences' icon in the Dock, or by selecting the System Preferences menu item from the Apple menu.
  1. Click the Network preference pane in the System Preferences window.

    The Network preference pane will display all of the network connection types currently available to your Mac. Usually, only one connection type is active, as indicated by the green dot next to its name. In this example, we will show you how to change the DNS setting for either an Ethernet connection or Wi-FI. The process is basically the same for any connection type you may by using, Ethernet, AirPort, Wi-Fi, Thunderbolt Bridge, even Bluetooth or something else entirely.

  1. Select the connection type whose DNS settings you wish to change. An overview of the settings used by the selected connection will display. The overview may include the DNS settings, ip address in use, and other basic networking inormation, but do not make any changes here.
  2. Click the 'Advanced' button. The Advanced Network sheet will display.
  3. Click the 'DNS' tab. This will display two lists. One of the lists contains the DNS Servers and the other list contains Search Domains. You can find out more about Search Domains s bit later in this article.

The DNS Servers list may be empty, it may have one or more entries that are grayed out, or it may have entries in normal dark text. Grayed out text implies the IP addresses for the DNS server(s) were assigned by another device on your network, usually your network router. You can override the assignments by editing the DNS server list on your Mac. When you override DNS entries here, using your Mac's Network preference pane, it only affects your Mac and not any other device on your network.

Entries in dark text indicate the DNS addresses were entered locally on your Mac. And of course, an empty entry signifies no DNS servers have been assigned yet.

Editing DNS Entries

If the DNS list is empty, or has one or more grayed entries, you can add one or more new DNS addresses to the list. Any entries you add will replace any grayed out entries. If you wish to keep one or more of the grayed out DNS addresses, you will need to write the address down and then manually reenter it as part of the process of adding new DNS addresses.

If you already have one or more DNS servers listed in dark text, any new entries you add will appear lower in the list and will not replace any existing DNS servers. If you want to replace one or more existing DNS servers, you can either enter the new DNS addresses, and then drag the entries around to re-arrange them, or delete the entries first, and then add the DNS address back in the order you wish them to appear.

The order of the DNS servers is important. When your Mac needs to resolve a URL, it queries the first DNS entry on the list. If there is no response, your Mac will ask the second entry on the list for the necessary information. This continues until either a DNS server returns an answer, or your Mac runs through all of the listed DNS servers without receiving a response.

Adding a DNS Entry

  1. Click the '+' (plus sign) in the bottom left corner.
  2. Enter the DNS server address in either IPv6 or IPv4 formats. When entering IPv4 use dotted decimal format, that is, three groups of numbers separated by a decimal point. An example would be 208.67.222.222 (that's one of the DNS servers available from Open DNS). Press return when done. Do not enter more than one DNS address per line.
  3. To add more DNS addresses, repeat the above process.

Deleting a DNS Entry

  1. Highlight the DNS address you wish to remove.
  2. Click the '-' (minus sign) in the bottom left-hand corner.
  3. Repeat for each additional DNS address you wish to remove.

If you remove all DNS entries, any DNS address configured by another device (a grayed out entry) will return.

Using Search Domains

The search domain pane in the DNS settings is used for auto-completing host names used in Safari and other network services. As an example, if your home network was configured with the domain name of example.com, and you wanted to access a network printer named ColorLaser you would normally enter ColorLaser.example.com in Safari to access its status page. 

If you added example.com to the Search Domain pane, then Safari would be able to append example.com to any single host name entered. With the Search Domain pane filled in, next time you could just enter ColorLaser in Safari's URL field, and it would actually connect to ColorLaser.example.com.

Search Domains are added, removed, and orginized using the same method as DNS entries discussed above.

Finishing Up

Once you have finished making your edits, click the 'OK' button. This will close the Advanced Network sheet and return you to the main Network Preference pane.

Click the 'Apply' button to complete the DNS editing process.

Your new DNS settings are ready to be used. Remember, the settings you changed only affect your Mac. If you need to alter DNS settings for all the devices on your network, you should consider making the changes at your network router.​

You may also wish to test the performance of your new DNS provider. You can do this with the help of the guide: Test Your DNS Provider to Gain Faster Web Access​.​