Set custom DNS servers on macOS

Comments 0

Set custom DNS servers on macOS

Today I’ll show you how to set custom DNS servers on macOS, which can improve network performance, increase security, and even thwart some websites using Geo-blocking.


Free DNS Providers

Before changing DNS servers you’ll need to find a third-party DNS provider, there are plenty of good (and free) services available too. I recommend Google DNS which is what I use and have never had an issue. I will list here the most popular DNS providers:


  • Primary IPv4:
  • Secondary IPv4:
  • Preferred IPv6: 2001:4860:4860::8888
  • Alternate IPv6: 2001:4860:4860::8844


  • Primary:
  • Secondary:
  • Preferred IPv6: 2620:0:ccc::2
  • Alternate IPv6: 2620:0:ccd::2


  • Primary:
  • Secondary:


  • Primary:
  • Secondary:


  • Primary:
  • Secondary:


  • Primary:
  • Secondary:


  • Primary:
  • Secondary:


Set Custom DNS Servers on macOS

  1. Click System Preferences, then Network
    Click System Preferences, then Network
  2. Select your connection (wired or wireless) then click the Advanced… button
    Click Ethernet, then Advanced
  3. Click the DNS tab, then click the plus icon + to add a DNS server, enter the Primary DNS IP address, then Secondary DNS IP address, then click OK to close, then click Apply
    Click DNS, then the Plus button to add DNS server IP addresses
  4. Open Finder and click Applications, then Utilities
    Open Finder, then click Utilities
  5. Click the Terminal application icon
    Open Terminal application
  6. Enter the following code, one line at a time:
    sudo dscacheutil -flushcache;
    sudo killall -HUP mDNSResponder; say Success

    Enter the code
  7. Close the Terminal application and you’re all done.

Video: Set custom DNS servers on macOS


I hope everything went smoothly for you and you now have custom DNS servers on your Mac. If you did have any trouble, hit me up in the comments or socials/email.

Newsletter Signup

Privacy Policy

See Also

Further Reading

Categories macOS, Miscellaneous


There are currently no comments on this article.


Enter your comment below. Fields marked * are required. You must preview your comment before submitting it.

PLEASE NOTE: You must preview a comment before submitting

Comments use Textile formatting