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, screenshot
Add your DNS entries, one per line.


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 to 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 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.

  2. Click the Network preference pane in the System Preferences window. The Network preference pane displays 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 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 be using – Ethernet, AirPort, Wi-Fi, Thunderbolt Bridge, even Bluetooth or something else entirely.

  3. 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 information, but do not make any changes here.

  4. Click the Advanced button. The Advanced Network sheet will display.

  5. Click the DNS tab, which then displays two lists. One of the lists contains the DNS Servers, and the other list contains Search Domains. (More about Search Domains appears a 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 a 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 the dark text indicate the DNS addresses were entered locally on your Mac. And of course, an empty entry signifies that no DNS servers have yet been assigned.

Editing DNS Entries

If the DNS list is empty or has one or more grayed-out 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 need to write the address down and then manually re-enter them 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 rearrange them, or delete the entries first, and then add the DNS addresses 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 asks 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 (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 hostnames used in Safari and other network services. As an example, if your home network was configured with the domain name of, and you wanted to access a network printer named ColorLaser, you would normally enter in Safari to access its status page. 

If you added to the Search Domain pane, then Safari would be able to append to any single hostname 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

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

Finishing up

Once you have finished making your edits, click the OK button. This action closes the Advanced Network sheet and returns 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.