If there's an issue with your DNS configuration, trying to access a website by its DNS name, such as www.apple.com, might seem slower than accessing the same site by its numerical IP address, such as https://22.214.171.124. Two causes of the issue are described below.
You might be accessing a non-responsive DNS server, or using an invalid DNS configuration. A DNS server converts a name (such as www.apple.com) to a numerical IP address (such as 126.96.36.199). You can connect to an IP address without any delay, because the need for DNS resolution is avoided. Here are four scenarios in which the symptom could occur:
- You have specified two or more DNS servers in the Network preference pane, possibly at the direction of a network administrator or your ISP (Internet Service Provider), but the first server on the list is incorrect or not responding. The delay occurs while your Mac waits for the first server to respond, before it tries the next DNS server in your list. Make sure the DNS addresses are entered correctly. Changing the order of DNS addresses might improve performance. If your network administrator prefers that the primary server be used, you can change back to the original order after the issue is resolved with the primary server.
- Your network might be configured to provide automatic discovery of DNS service, without requiring you to manually enter the DNS server addresses at your computer. If you manually entered a DNS address that is incorrect or out of date, your computer might wait for the incorrect address to respond (a "timeout") before succeeding at automatic discovery.
- You haven't specified a DNS server, and automatic discovery of the service is not provided on your network. In this scenario, you can connect only via an IP address. Web pages don't load at all via a DNS name.
Check with your network administrator or ISP to make sure that your DNS information is correct. If your ISP provides only one DNS address, consider requesting a second one to use when the first one becomes unavailable.
After you have the addresses, you can use these steps to change your DNS information. After using these steps, you might need to quit and reopen Internet applications to return to normal behavior.
- From the Apple menu, choose System Preferences. Then click Network.
- Select the interface that you're using to connect to the Internet, such as Ethernet or Wi-Fi.
- Click the Advanced button.
- Click the DNS tab.
- In the DNS Servers section of the window, click the Add (+) or Remove (–) button to add or remove the IP address of a DNS server. If you have more than one DNS server, you can drag the IP addresses to change their order.
You might experience a delay with the first connection after changing networks on a notebook computer. For example, you might use a MacBook at home with Wi-Fi, then take it to work or school and use an Ethernet connection. By default, your Mac uses one set of Internet preferences (known as a location) named Automatic. It searches your computer's network interfaces until it finds the one that is connected to the Internet. You might experience a delay while your computer determines which network it's on. To determine whether this is the issue, you can test by creating a location that contains only one network interface.
If issues continue after trying these steps, consider removing any manually-entered DNS addresses from the Network preferences pane. Select the address, then click the Remove (-) button. (If the address is dimmed, it can't be removed.)