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
Launch System Preferences by clicking the System Preferences icon in the Dock, or by selecting the System Preferences menu item from the Apple menu.
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.
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.
Click the Advanced button. The Advanced Network sheet will display.
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 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 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
Click the + (plus sign) in the bottom left corner.
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 188.8.131.52 (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.
To add more DNS addresses, repeat the above process.
Deleting a DNS Entry
Highlight the DNS address you wish to remove.
Click the – (minus sign) in the bottom left-hand corner.
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 organized using the same method as DNS entries discussed above.
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.