Where to change DNS and why you might want to

DNS (Domain Name System) is what translates web addresses like google.com into the IP addresses your computer actually needs to connect. By default, your internet provider assigns you their DNS servers, but you can change this to use a different provider's servers instead — often to get faster lookups, better privacy, or to block certain websites.

You can change DNS at three different levels: on your individual device (Windows, Mac, or Linux), on your router (which affects all devices connected to it), or through your internet provider. This guide covers the device-level changes, which take effect immediately and don't require a technician or account access.

The most common reasons to change DNS are to use a faster public DNS service like Cloudflare (1.1.1.1) or Google (8.8.8.8), to switch to a privacy-focused provider like Quad9, or to use a DNS service that blocks malware and adult content for parental controls.

Key Takeaways

  • DNS changes on your device take effect within minutes and only affect that computer or phone, not your whole network.
  • Windows, Mac, and Linux all store DNS settings in different places, but the process involves finding your network settings and entering two DNS server addresses.
  • Common public DNS services include Cloudflare (1.1.1.1 and 1.0.0.1), Google (8.8.8.8 and 8.8.4.4), and Quad9 (9.9.9.9 and 149.112.112.112).
  • If a DNS change causes problems, you can revert to automatic settings or contact your internet provider for their DNS addresses.
  • Changing DNS on your router instead of your device affects all connected devices at once but requires access to your router's admin panel.

How to change DNS on Windows 10 and 11

Open Settings by pressing Windows key + I, then go to Network & Internet on the left sidebar. Click on your connection type (Ethernet if you're wired, or Wi-Fi if you're wireless), then scroll down and select "Edit" next to DNS server assignment.

A dropdown menu will appear showing "Automatic (DHCP)" as the current setting. Click the dropdown and select "Manual". Toggle on "IPv4" if it isn't already, then enter your preferred DNS server addresses in the two fields that appear. For example, if you want to use Cloudflare, enter 1.1.1.1 in the first field and 1.0.0.1 in the second.

Click Save. Your computer will use the new DNS servers within a few seconds. To verify the change worked, open Command Prompt and type nslookup google.com — the response should show which DNS server answered your query.

How to change DNS on Mac

Click the Apple menu and select System Settings (or System Preferences on older macOS versions). Go to Network on the left sidebar, then select your active connection (Wi-Fi or Ethernet) and click Advanced.

Select the DNS tab. You'll see a list of current DNS servers with a plus and minus button below. Click the minus button to remove your current DNS servers, then click the plus button to add new ones. Enter each DNS server address one at a time — for Cloudflare, add 1.1.1.1 first, then 1.0.0.1.

Click OK, then Apply. The change takes effect immediately. To test it, open Terminal and type nslookup google.com to confirm your new DNS server is responding.

How to change DNS on Linux

Linux DNS configuration varies by distribution and whether you're using a graphical interface or command line. On Ubuntu with GNOME desktop, click the system menu (top right), select Settings, go to Network, click the gear icon next to your connection, and select the IPv4 tab.

Toggle the DNS switch to on, then enter your DNS servers separated by commas in the DNS field. For example: 1.1.1.1, 1.0.0.1. Click Apply. On systems using systemd-resolved (most modern distributions), you can also edit the file /etc/systemd-resolved.conf directly: find the line starting with #DNS= and change it to DNS=1.1.1.1 1.0.0.1, then save and restart the service with sudo systemctl restart systemd-resolved.

To verify the change, open a terminal and type resolvectl status to see which DNS servers your system is using.

Changing DNS on your router instead of your device

If you want all devices on your network to use the same DNS servers, you can change the setting on your router instead. Log into your router's admin panel by opening a web browser and typing 192.168.1.1 or 192.168.0.1 (check your router's label if neither works). Enter your admin username and password — if you haven't changed these, they're usually admin/admin or admin/password.

Look for a DNS or DHCP settings section, usually under Advanced or Network settings. Enter your preferred DNS servers in the Primary DNS and Secondary DNS fields, then save and reboot the router. This change affects every device that connects to that router, but it takes a few minutes to propagate.

The downside is that all devices use the same DNS, so you can't have different settings for different computers. Also, if you change DNS on your device, it will override the router setting for that device only.

Common DNS services and what they offer

Cloudflare (1.1.1.1 and 1.0.0.1) is fast and focuses on privacy — Cloudflare says they don't log your DNS queries. Google (8.8.8.8 and 8.8.4.4) is widely used and reliable but Google does log some query data. Quad9 (9.9.9.9 and 149.112.112.112) blocks known malware and phishing sites automatically, making it useful for security-conscious users.

For parental controls, services like OpenDNS (208.67.222.222 and 208.67.220.220) let you block categories of websites like adult content or gambling. If you want to block ads at the DNS level, Pi-hole is a free option you can run on a home server or Raspberry Pi, though it requires more technical setup than using a public DNS service.

What to do if DNS changes cause problems

If you change DNS and websites stop loading or load very slowly, the new DNS service may be down or unreachable from your location. Revert to automatic DNS by going back to your network settings and selecting "Automatic" or "DHCP" instead of manual entry. This will restore your internet provider's DNS servers.

If you want to keep the new DNS but it's not working, try the secondary address first — sometimes the primary server is overloaded. You can also contact your internet provider and ask for their DNS server addresses, then enter those manually to confirm your device's DNS settings work at all.

Some corporate networks or school networks block custom DNS servers entirely. If you're on a managed network and can't change DNS, contact your network administrator — they may have a policy reason for the restriction.

Frequently Asked Questions

Will changing DNS make my internet faster?

It might, depending on your location and which DNS service you choose. Cloudflare and Google both have fast servers worldwide, but your internet provider's DNS may already be fast if you're close to their servers. The only way to know is to test — change DNS for a few days and see if page load times improve. If not, switch back.

Does changing DNS affect my security?

It can improve it if you switch to a service like Quad9 that blocks malware domains automatically. However, your internet provider can still see which websites you visit (they see the traffic even if they don't handle DNS). For real privacy, you need a VPN, not just a different DNS service.

Can I use different DNS servers for different websites?

Not easily at the device level — you set one or two DNS servers and your device uses them for all lookups. Some advanced users run local DNS software like dnsmasq to route specific domains to different servers, but this requires command-line setup.

What happens if I enter the wrong DNS address?

Your device will try to contact that address and fail, so websites won't load. You'll see a "can't reach this site" error. Simply go back to your network settings and either enter a correct address or switch back to automatic DNS — there's no permanent damage.

Do I need to restart my computer after changing DNS?

No. DNS changes take effect within seconds on Windows, Mac, and Linux. You might need to close and reopen your web browser to clear its cached DNS lookups, but a full restart is not necessary.