Change DNS Servers on Mac: Step-by-Step Guide
To change DNS servers on a Mac, open System Settings > Network, select your active connection (Wi-Fi or Ethernet), click Details, then go to DNS and add or remove server addresses. This guide walks through the exact steps for current macOS versions, explains why you might want to change DNS, and covers common issues.
Why Change DNS Servers on a Mac?
DNS (Domain Name System) translates human-readable domain names like example.com into IP addresses that computers use to connect. Your Mac normally uses the DNS servers provided by your router or ISP, but these may be slow, unreliable, or lacking in privacy features. Changing to a different DNS provider can improve speed, increase reliability, or add filtering for adult content or malware. For example, some public DNS services offer faster response times in certain regions, while others block known malicious domains. If you’re a developer or network administrator, you might also need custom DNS for testing or internal services.
How DNS Works on macOS
macOS uses the mDNSResponder process to handle DNS queries and caching. When you change DNS servers in System Settings, the system updates the configuration for that network interface. The new settings apply immediately to new connections, though existing connections may need to be renewed. You can check your current DNS servers by running scutil --dns in Terminal or by looking at the Network pane in System Settings. Note that macOS can use multiple DNS servers; it sends queries to them in the order listed, so the first server that responds is used.
Step-by-Step: Change DNS on macOS Ventura and Later
- Open System Settings (Apple menu > System Settings, or click the Apple logo and select System Settings).
- Click Network in the sidebar.
- Select your active connection (Wi-Fi or Ethernet). If you’re on Wi-Fi, make sure you’re connected to the network you want to configure.
- Click Details… next to the connection name.
- In the sheet that appears, select DNS from the left column.
- Click the + button under the DNS Servers list and type the IP address of the DNS server you want to add. For IPv6, use the appropriate address format.
- To remove a server, select it and click the – button.
- Click OK and then Apply to save changes.
If you’re on an older macOS version (Monterey or earlier), the steps are similar but the interface is called System Preferences, and the Details button is labeled Advanced.
How to Choose a DNS Server
When selecting a DNS provider, consider these factors:
- Speed: Use a tool like
digor online DNS benchmark tools to compare response times from your location. Some providers have more servers in your region. - Privacy: Check the provider’s logging policy. Some keep no logs, others retain data for a limited time.
- Security: Look for providers that block known malicious domains or offer DNSSEC validation.
- Features: Some DNS services offer content filtering (e.g., blocking adult sites), parental controls, or anti-phishing.
- Reliability: Choose a provider with a strong uptime record and multiple redundant servers.
Common public DNS servers include Google Public DNS (8.8.8.8 and 8.8.4.4), Cloudflare (1.1.1.1 and 1.0.0.1), and Quad9 (9.9.9.9). These are free and widely used, but you can also use your ISP’s DNS if it performs well.
Common Problems and Fixes
After changing DNS servers, you might encounter issues:
- Websites not loading: If the new DNS server is unreachable or blocks a site, try a different server or revert to automatic.
- DNS cache not clearing: macOS may cache old DNS responses. Flush the cache by running
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponderin Terminal. - VPN interference: If you use a VPN, it may override your DNS settings. Check the VPN’s configuration or its own DNS options.
- IPv6 issues: Some networks have IPv6 DNS servers that may not be reachable. You can add IPv6 addresses or disable IPv6 temporarily to test.
- Settings not sticking: Ensure you clicked Apply after making changes. If the problem persists, restart your Mac or renew the DHCP lease.
Comparing DNS Providers
Here’s a quick comparison of popular public DNS providers:
- Google Public DNS: Fast, reliable, no logging after 48 hours, supports DNSSEC. IPs: 8.8.8.8, 8.8.4.4.
- Cloudflare: Emphasizes privacy (logs only limited data), very fast, supports DNSSEC and DoH. IPs: 1.1.1.1, 1.0.0.1.
- Quad9: Blocks malicious domains, no logging, uses threat intelligence. IPs: 9.9.9.9, 149.112.112.112.
- OpenDNS: Offers filtering and parental controls, but logs some data. IPs: 208.67.222.222, 208.67.220.220.
Note that performance varies by location and ISP, so the best choice may differ for you.
Safety and Privacy Considerations
Changing DNS servers is generally safe, but be aware of the following:
- Trustworthiness: Only use DNS servers from reputable organizations. An untrusted DNS provider could redirect you to malicious sites or intercept queries.
- Encryption: Standard DNS queries are unencrypted, so they can be seen by anyone on your network. To protect against snooping, use DNS over HTTPS (DoH) or DNS over TLS (DoT) if your provider supports it. macOS supports these in recent versions, but you may need to enable them in Network settings or via configuration profile.
- Legal implications: In some jurisdictions, using third-party DNS may bypass local content filters, which could violate laws. Always comply with local regulations.
Alternatives to Changing DNS Manually
If you don’t want to change DNS servers manually, consider these alternatives:
- Router-level DNS: Change DNS settings on your router to apply to all devices on your network. This is useful for home networks with multiple devices.
- DNS over HTTPS (DoH) via browser: Some browsers like Firefox and Chrome have built-in DoH settings that can use a secure DNS provider without changing system settings.
- Third-party apps: Some apps can manage DNS settings for you, but they may require more permissions.
- Use a VPN: Many VPN services route DNS queries through their own encrypted servers, which can provide privacy and sometimes better performance.
Frequently Asked Questions
Will changing DNS servers improve my internet speed?
It can, but not always. If your ISP’s DNS is slow or overloaded, a faster public DNS might reduce the time it takes to resolve domain names, making web browsing feel snappier. However, once the DNS lookup is cached, the impact is minimal. Test with a benchmarking tool to see if there’s a real difference.
Is it safe to use public DNS servers like 8.8.8.8?
Yes, using well-known public DNS servers from reputable companies is generally safe. They are widely used and have strong security measures. However, be aware that your DNS queries will be visible to that provider, so check their privacy policy. For maximum privacy, use a provider that supports encrypted DNS (DoH/DoT).
How do I revert to automatic DNS on my Mac?
Go to System Settings > Network > Details > DNS, select all the DNS servers you added, and click the minus button to remove them. Then click OK and Apply. macOS will fall back to the DNS servers provided by your router or ISP.
Why is my Mac not using the DNS server I set?
Possible reasons: the DNS server is unreachable, you didn’t click Apply, or a VPN or other network service is overriding the settings. Check your network connection, ensure the IP address is correct, and try flushing the DNS cache. Also, make sure you’re editing the correct network interface (Wi-Fi vs Ethernet).
Can I set different DNS servers for different networks?
Yes, macOS stores DNS settings per network interface and per network location. You can configure different DNS for Wi-Fi and Ethernet, and you can create separate Locations (in System Settings > Network > Locations) to switch between sets of network configurations, each with its own DNS.
Does changing DNS affect my privacy?
Yes, because your DNS provider sees every domain you visit. If you use your ISP’s DNS, they already see that. Using a third-party DNS moves that visibility to the third party. To keep your DNS queries private, use a provider that supports encrypted DNS and has a no-log policy, or use a VPN that encrypts all traffic.
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.