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
- 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 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 use Ethernet 2, which happens to be the wired Ethernet connection I use on my Mac. Your connection may be called simply Ethernet, AirPort, 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 includes the DNS settings, but do not make any changes here.
- Click the 'Advanced' button. The Advanced Network sheet will display.
- Click the 'DNS' tab. This will display two lists. One of the lists contains the DNS Servers and the other list contains Search Domains. We will not address Search Domains in this tip, so you can safely ignore them at this time.
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 must first delete them.
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
- Click the '+' (plus sign) in the bottom left corner.
- Enter the DNS server address in dotted decimal format, that is, three groups of numbers separated by a decimal point. An example would be 220.127.116.11 (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.
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.