Skip to Content
Back to Shortcutie

Updated

How to Change the DNS Server on Mac

By Sindre Sorhus, who makes the Shortcutie app

With Shortcutie

A shortcut is faster when you switch often, like to a DNS server that blocks ads, and back:

  1. Install Shortcutie, and open it once.
  2. In the Shortcuts app, click the add button to make a new shortcut.
  3. Add the “Set DNS Servers” action of Shortcutie, click its field, and add the addresses, like 1.1.1.1 and 1.0.0.1.
  4. Make a second shortcut with the action, but keep its field empty. It goes back to the DNS servers of your network.
  5. Run a shortcut, and enter your password when macOS asks for it.

The action changes the network service that your Mac uses now, like Wi-Fi or Ethernet. To see the current servers, use “Get DNS Servers”. Its result is empty when the Mac uses the DNS servers of the network.

To run the shortcuts in one click, put them in the menu bar. If a website still goes to the old address after a change, flush the DNS cache.

Get Shortcutie

Power up the Shortcuts app on Mac

$10, one-time purchase, plus tax where applicable

Platform
macOS
Requires
macOS 26 or later
Released
February 2025
Updated
September 2026
Free updates
10
Version
1.8.1
Size
9 MB
Gumroad rating
4.9/5 (26 ratings)

More about Shortcutie

Without an app

  1. Open “System Settings › Network”, and click the network service that you use, like Wi-Fi.
  2. Click “Details” next to the network, and click “DNS”. You may need to scroll down.
  3. Click the add button below “DNS Servers”, and type the address of a server, like 1.1.1.1 (Cloudflare) or 8.8.8.8 (Google). Add a second server in the same way.
  4. Click “OK”.

Apple’s instructions. To go back to the DNS servers of your network, remove the servers from the list.

In Terminal, sudo networksetup -setdnsservers Wi-Fi 1.1.1.1 1.0.0.1 does the same for Wi-Fi, and sudo networksetup -setdnsservers Wi-Fi empty removes the servers. The settings and Terminal are enough when you change the DNS servers once.