How to Change Your DNS Resolvers on macOS

If you are experiencing difficulty reaching a specific web address/hostname that seems to be working from other locations or networks, it could be due to your local DNS resolver (which is where your computer gets DNS data) taking longer-than-most to update the DNS records. When this happens, a helpful troubleshooting step is to set your computer to use alternate DNS resolvers.

There are a number of options for DNS resolvers, but in this example we'll be using Google's free DNS service. Let's get started!

1
Click on the  button in the top left corner and then System Settings.

The Apple menu dropdown with an arrow pointing to the system settings option.

2
In the System Settings window, click on the 'Network' option.

A list of system settings with an arrow pointing to the Network option.

3
In the Network pane on the right, click on the network you use to connect to the internet.

A list of networks with an arrow pointing to the wifi option.

4
To the right of your chosen network, click on the Details button.

A wifi network listed with an arrow pointing to a details button to its right.

5
In the window that opens, choose the DNS option on the left.

A list of networking options with an arrow pointing to the DNS option.

6
To the right, click on the + button to add a DNS server.

A list of networking options with an arrow pointing to the DNS option.

7
Enter the primary IP address for the DNS resolver you want to set. For Google DNS, this will be 8.8.8.8, then press the return key.

A list of networking options with an arrow pointing to the DNS option.

You'll then repeat step 6 and add 8.8.4.4 or whatever the secondary IP address is for the DNS resolver you are using.

A list of networking options with an arrow pointing to the DNS option.

A list of networking options with an arrow pointing to the DNS option.

8
Once those are both set, click the OK button to save and apply these changes.

A DNS servers window with an arrow pointing to the OK button in the bottom right.

9
That's it! If you want to test this out, you can open a terminal window and use the command 'dig porkbun.com' which will look up the A records for Porkbun.com. You should see the DNS resolver you set in the 'SERVER' section at the bottom of the answer.

A terminal command response with an arrow pointing to a line labeled SERVER showing 8.8.8.8.

All of your DNS lookups, used to resolve web addresses and other hostnames, will now be provided by whichever DNS resolver you assigned. If hostnames that were not working before start to work after this change, you will know that the issue was due to slow DNS updating with your default DNS resolver.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.