How to Change DNS Settings on Mac for Privacy
Quick answer: To change DNS on a Mac, open System Settings > Network, click the connection you use (such as Wi-Fi), click Details, then DNS, and add a resolver such as Cloudflare (1.1.1.1) or Quad9 (9.9.9.9) with the + button (Apple's steps). That moves your lookups away from your internet provider's resolver, but plain DNS still crosses the network unencrypted, so for real privacy also turn on encrypted DNS with the provider's profile.
Below: what DNS reveals, the steps in System Settings and Terminal, encrypted DNS, and what changing DNS can't hide.
DNS, or Domain Name System, is basically the phone book of the internet. When you type "github.com" into your browser, your Mac asks a DNS server "hey, what's the IP address for github.com?" The server responds with something like "140.82.112.3" and your Mac connects to that address. Simple enough, right?
Here's where it gets interesting for privacy though. By default, your Mac uses the DNS servers your network hands it, usually your router, which passes lookups to your internet provider's servers, and they can see every domain you look up. They can't see what you do on those sites if they use HTTPS (which most do these days), but they can see that you visited reddit.com, followed by github.com, then maybe some-embarrassing-domain.com. That's actually a lot of information about your browsing habits.
The good news? Changing DNS on a Mac takes a few minutes. A new server changes who sees your lookups; encrypted DNS also stops other people on the network from reading them.
What DNS Servers Can Actually See
Let me be clear about what we're protecting against here. Your DNS provider can see:
- Every domain you visit (reddit.com, github.com, whatever)
- When you visit them
- How often you visit them
- Your IP address (which roughly identifies your location)
They can't see the specific pages you visit or what you do on those sites. So they know you went to reddit.com, but not which subreddit or which posts you read.
Is this a huge privacy risk? Honestly, it depends on your threat model. For most people, it's probably not the end of the world. But if you're already thinking about privacy (which you are, since you're reading this), DNS is one of those easy changes that costs you nothing.
Finding Your Current DNS Settings
Before we change anything, let's see what you're currently using. Open Terminal and run:
scutil --dns | grep nameserver
You'll see something like this:
nameserver[0] : 192.168.1.1
nameserver[1] : 8.8.8.8
Those first numbers (192.168.1.1) are probably your router, which forwards requests to your ISP's DNS servers. The second might be Google's public DNS if someone already changed your settings.
You can also check in System Settings, but the command line gives you a clearer picture of what's actually happening.
Privacy-Focused DNS Providers
Several public DNS providers publish privacy policies that limit what they keep. Two widely used ones are Cloudflare and Quad9.
| Provider | Primary | Secondary | Blocks known-bad domains | What it says it keeps |
|---|---|---|---|---|
| Cloudflare | 1.1.1.1 | 1.0.0.1 | No (on 1.1.1.1) | Truncates your IP address and deletes resolver logs within 25 hours, apart from limited sampled data without IP addresses (Cloudflare's policy) |
| Quad9 | 9.9.9.9 | 149.112.112.112 | Yes, from its threat lists | Doesn't collect or hold the IP addresses that send it queries (Quad9's policy) |
Both are free. Pick the one whose policy you trust more than your ISP's; your mileage may vary depending on which ISP you have.
Changing DNS in System Settings
Here's how to change DNS through System Settings on macOS 13 or later:
- Choose Apple menu > System Settings, then click Network in the sidebar.
- Click the network service you use, such as Wi-Fi or Ethernet, then click Details.
- Click DNS (you may need to scroll down).
- Under DNS Servers, click + and add the provider's two addresses: 1.1.1.1 and 1.0.0.1 for Cloudflare, or 9.9.9.9 and 149.112.112.112 for Quad9.
- Select any old entries you added before and click −, then click OK.
Grey entries come from your network; once you add your own, your Mac uses yours instead. Put the server you prefer first.
Configuring DNS via Terminal
If you prefer the command line (and honestly, sometimes it's just faster), you can configure DNS using networksetup. First, list your network services:
networksetup -listallnetworkservices
You'll see something like "Wi-Fi" or "Ethernet". Then set your DNS servers:
networksetup -setdnsservers "Wi-Fi" 1.1.1.1 1.0.0.1
Replace "Wi-Fi" with whatever network service you're using. To verify it worked:
networksetup -getdnsservers "Wi-Fi"
To go back to the servers your network provides, run networksetup -setdnsservers "Wi-Fi" Empty.
Encrypted DNS (DNS over HTTPS and DNS over TLS)
Here's where things get more interesting. Traditional DNS queries are sent in plain text, which means anyone between you and the DNS server can see them. Your ISP, your coffee shop's Wi-Fi owner, whoever. That includes queries to 1.1.1.1 or 9.9.9.9 if you only changed the server addresses.
DNS over HTTPS (DoH) and DNS over TLS (DoT) encrypt those queries. macOS has supported both since Big Sur, but there's no switch for it in System Settings. Instead, you install a configuration profile from the provider. Quad9, for example, publishes profiles and step-by-step instructions in its macOS setup guide. After you open the downloaded profile, you approve it in System Settings (General > Device Management on macOS 15 and later, Privacy & Security > Profiles on earlier versions).
Two things to know before you install one, both from Quad9's guide:
- A VPN, iCloud Private Relay or Little Snitch may not use the profile.
digandnslookupin Terminal don't use encrypted DNS, so they won't show the profile at work.
You can also turn on encrypted DNS in a single browser. In Firefox, go to Settings > Privacy & Security and scroll to DNS over HTTPS. In Chrome, go to Settings > Privacy and security > Security and turn on Use secure DNS. That covers the browser only, not the rest of your Mac.
If you only change the server addresses, your lookups still cross the network in plain text. An encrypted profile is the step that closes that gap.
Testing Your New DNS Configuration
After changing your DNS servers, you'll want to verify everything's working. Try this:
nslookup google.com
The "Server:" line shows which DNS server answered. You can also use online tools like dnsleaktest.com to confirm your DNS queries are going where you think they are.
If lookups still seem to use your old servers, flush the DNS cache:
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
Apps That Use Their Own DNS
Here's something most people don't know: some apps and browsers resolve names themselves. Firefox, for example, can use its own DNS over HTTPS provider, and in some regions it does so by default, so your system settings don't apply to it.
There's not much you can do about this without more advanced network monitoring. Tools like Little Snitch can show you which servers each app connects to, and you can find which app is using the internet on your Mac with built-in tools too.
Router vs. Device DNS Settings
Quick note about where to configure DNS. You can set it on your router (affecting all devices on your network) or on individual devices like your Mac.
I prefer setting it on the router because it covers everything — your Mac, your phone, smart home devices, whatever. But if you don't control your router (like at work or on public Wi-Fi), device-level settings are your only option.
Router configuration varies by manufacturer, but it's usually under "Internet" or "WAN" settings. Look for "DNS Server" or "Domain Name Server" options.
Mobile Considerations
If you're thinking about privacy holistically, don't forget about your iPhone or iPad. iOS has similar DNS settings under Settings > Wi-Fi > [network name] > Configure DNS.
Encrypted DNS profiles work there too. Quad9, for example, publishes profiles for iPhone and iPad.
Limitations and Honest Caveats
Let me be straight about what changing DNS doesn't do. It doesn't hide your browsing from your ISP if sites use plain HTTP (though most don't anymore). Your ISP still sees the IP addresses you connect to, and often the site's name too, which most HTTPS connections send unencrypted at the start. And it doesn't protect you from tracking cookies, fingerprinting, or any of the other ways websites identify you.
It's also worth noting that you're essentially moving trust from your ISP to another company. Cloudflare and Quad9 publish privacy policies, but you're still trusting them with information about your browsing habits.
If you're on a corporate network, changing DNS might break internal services that depend on your company's DNS servers. In some cases, it might even violate IT policies.
And honestly? If you're worried enough about privacy to change DNS settings, you should probably also be thinking about which apps have access to your data and what they're doing with it. DNS is just one piece of a much larger privacy puzzle.
Performance Considerations
Different DNS providers have different performance characteristics. Cloudflare and Quad9 both run servers in many countries, so speed mostly depends on where you are and how your ISP connects to them.
You can compare response times in Terminal: run dig @1.1.1.1 apple.com and dig @9.9.9.9 apple.com and look at the "Query time" line. If you notice slowdowns after changing DNS, try a different provider or go back to your ISP's servers.
Monitoring Your DNS Configuration
Once you've configured privacy-focused DNS, you might want to check now and then that it stays that way. A VPN, a configuration profile or a Mac managed by your work can override the servers you set.
The command line approach I showed earlier (networksetup -getdnsservers) is perfect for checking your configuration periodically. You could even set up a simple script to alert you if your DNS servers change unexpectedly.
Changing DNS on your Mac is one of those simple changes that improves your privacy without much effort. It's not going to make you invisible online, but it does reduce the amount of information you're sharing with your ISP, especially with encrypted DNS, and it can improve your security if you choose a provider like Quad9 that blocks malicious domains.
The setup takes maybe five minutes, and once it's done, you don't really need to think about it again. That's my kind of privacy improvement — effective and low-maintenance.