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.
- 2
- In the System Settings window, click on the 'Network' option.
- 3
- In the Network pane on the right, click on the network you use to connect to the internet.
- 4
- To the right of your chosen network, click on the Details button.
- 5
- In the window that opens, choose the DNS option on the left.
- 6
- To the right, click on the + button to add a DNS server.
- 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.
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.
- 8
- Once those are both set, click the OK button to save and apply these changes.
- 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.
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.