How to Change DNS on Windows and Mac
In this article
Changing your DNS (Domain Name System) server can improve speed, reliability, and privacy, or help you bypass certain content restrictions. The process is straightforward on both Windows and Mac, and you can do it in a few minutes. Below are the exact steps for each system, plus troubleshooting and FAQs.
What You'll Need
- Administrator access on your computer (to change network settings).
- The DNS server addresses you want to use. Popular options include Google (8.8.8.8 and 8.8.4.4), Cloudflare (1.1.1.1 and 1.0.0.1), or your router's default. You can also use your ISP's DNS if you have the addresses.
- A stable internet connection (you'll need it to test after changing).
Step-by-Step
On Windows 10 and 11
- Open Network Settings: Click the Start button, type "Control Panel," and open it. Then go to Network and Internet > Network and Sharing Center. (In Windows 11, you can also right-click the network icon in the system tray and select "Network and Internet settings.")
- Access Adapter Settings: In the left sidebar, click Change adapter settings. You'll see a list of network connections (Wi-Fi, Ethernet, etc.).
- Open Properties: Right-click the connection you're using (the one that's active) and select Properties. If prompted by User Account Control, click "Yes."
- Select Internet Protocol Version 4 (TCP/IPv4): In the list, scroll to find Internet Protocol Version 4 (TCP/IPv4) and double-click it (or select it and click Properties).
- Enter DNS Server Addresses: In the new window, select Use the following DNS server addresses. Then type the preferred and alternate DNS server IPs. For example, for Google: Preferred = 8.8.8.8, Alternate = 8.8.4.4.
- Apply and Close: Click OK on both windows, then close the Control Panel. Your DNS change takes effect immediately.
On macOS (Ventura and later)
- Open System Settings: Click the Apple menu (top-left) and select System Settings.
- Go to Network: In the sidebar, click Network.
- Select Your Active Connection: Click on the network you're using (Wi-Fi or Ethernet). Make sure it's the one with a green dot.
- Open Details: Click the Details... button next to the connection.
- Find DNS Settings: In the new window, click DNS in the left column.
- Add DNS Servers: Click the plus (+) button under the DNS Servers list. Type the IP address of your preferred DNS (e.g., 8.8.8.8). Repeat to add a second one (e.g., 8.8.4.4).
- Apply: Click OK, then click Apply at the bottom right. Your changes are saved.
Note: Menu names and button labels can vary slightly by macOS version and region, but the general path is the same.
Common Mistakes
- Changing the wrong adapter: On Windows, you might accidentally change DNS on a disconnected adapter (like a virtual VPN adapter). Always right-click the one that shows as connected.
- Entering DNS addresses incorrectly: A typo like "8.8.8.8" instead of "8.8.8.8" (extra dot) will cause failure. Double-check each number.
- Forgetting to click "Apply" on Mac: If you close the window without applying, your changes won't take effect.
- Not clearing the DNS cache: Sometimes old DNS entries are cached, and your new settings won't be used until you flush it. (See Troubleshooting below.)
Tips
- Use a reputable public DNS provider like Google (8.8.8.8/8.8.4.4), Cloudflare (1.1.1.1/1.0.0.1), or Quad9 (9.9.9.9) for better privacy and speed.
- If you're on a corporate or school network, changing DNS might break access to internal resources. Check with your IT admin first.
- You can set DNS at the router level to affect all devices on your home network, but that's a separate process—this guide is for a single computer.
- After changing DNS, test with a website you haven't visited recently to see if it loads faster.
Troubleshooting
If the change doesn't seem to work:
- Flush the DNS cache: On Windows, open Command Prompt as administrator and type
ipconfig /flushdnsthen press Enter. On Mac, open Terminal and typesudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder(you'll need your password). - Restart your computer or network connection: Sometimes a simple reboot clears lingering settings.
- Verify the change took effect: Visit a site like
whatismydnsserver.comto see which DNS server you're actually using. If it still shows your old ISP's DNS, your change may have been applied to the wrong adapter, or your router might be overriding it (see next). - Check if your router overrides DNS: Some routers force their own DNS. If you're still seeing the old DNS, log into your router's admin page and look for DNS settings there, or set your computer's DNS to a static IP (rarely needed).
- Try a different DNS server: If the new DNS is unreachable (e.g., you used a wrong IP), switch to a known-good one like 1.1.1.1.
Frequently Asked Questions
Why would I want to change my DNS?
Changing DNS can improve browsing speed, increase privacy (by using a provider that doesn't sell your data), or help you access websites that are blocked by your ISP's DNS (though this is not a guarantee).
Is it safe to use public DNS like Google or Cloudflare?
Yes, these are reputable companies with strong privacy policies. However, they do see your DNS queries, so if you're very privacy-conscious, consider a provider like Quad9 that blocks malicious sites.
Will changing DNS affect my internet speed?
It can, but not always. A faster DNS server can reduce the time it takes to resolve domain names, which may make web browsing feel snappier. But if your internet connection is slow, DNS won't fix that.
Do I need to change DNS on both IPv4 and IPv6?
If your network uses IPv6 (most home networks do), you might want to set DNS for IPv6 as well. On Windows, you can edit the IPv6 properties similarly. On Mac, you can add IPv6 addresses in the same DNS list. But it's not required—IPv4 DNS works for most websites.
Can I change DNS on my phone the same way?
No, this guide is for Windows and Mac computers. On iPhones and Androids, you change DNS in the Wi-Fi settings or via a private DNS option (Android) or a DNS profile (iOS). The steps are different.
What if I want to revert to the original DNS?
Simply go back to the same settings and select "Obtain DNS server address automatically" (Windows) or remove the custom DNS entries (Mac). Your ISP's DNS will be used again.