# How to Change the DNS Server on Mac

Updated: November 15, 2026

- [Shortcutie](https://sindresorhus.com/shortcutie.md): Power up the Shortcuts app on Mac. Price: $10, one-time purchase, plus tax where applicable. Platforms: macOS. Get it from: [Gumroad](https://sindresorhus.gumroad.com/l/shortcutie?wanted=true), [Setapp](https://go.setapp.com/stp181?refAppID=1814&utm_medium=vendor_program&utm_content=button). Requires macOS 26 or later. Free older versions for macOS 15: [download](https://sindresorhus.com/shortcutie#older-versions).

URL: https://sindresorhus.com/guides/change-dns-server-mac

Open “System Settings › Network”, click your network, like Wi-Fi, click “Details”, and click “DNS”. Then add the servers, like `1.1.1.1` and `1.0.0.1`. To switch between DNS servers often, make a shortcut with the “Set DNS Servers” action of [Shortcutie](https://sindresorhus.com/shortcutie.md).

## With Shortcutie

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

1. Install [Shortcutie](https://sindresorhus.com/shortcutie.md), and open it once.
1. In the Shortcuts app, click the add button to make a new shortcut.
1. 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`.
1. Make a second shortcut with the action, but keep its field empty. It goes back to the DNS servers of your network.
1. 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](https://sindresorhus.com/guides/add-shortcut-to-menu-bar-mac.md). If a website still goes to the old address after a change, [flush the DNS cache](https://sindresorhus.com/guides/flush-dns-cache-mac.md).

## Without an app

1. Open “System Settings › Network”, and click the network service that you use, like Wi-Fi.
1. Click “Details” next to the network, and click “DNS”. You may need to scroll down.
1. 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.
1. Click “OK”.

[Apple’s instructions](https://support.apple.com/guide/mac-help/mh14127/mac). 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.