What DNS does and why you might change it
DNS is the system that turns web addresses like google.com into the actual computer address your device needs to reach. Your internet provider sets a default DNS server for you, but you can change it to a different one — usually in under five minutes — to block malicious sites, speed up page loads, or gain more privacy.
The default DNS from your provider works fine for most people. But some third-party DNS services filter out known malware sites before your browser even tries to reach them, which stops infections before they start. Others are faster because they have servers closer to you. A few promise not to log which sites you visit, though you should read their privacy policy to verify that claim.
Changing DNS is safe. It does not affect your internet speed in any meaningful way unless you pick a service that is genuinely faster than your provider's — and you can test that before committing. If you change your mind, you can switch back to your provider's DNS in the same settings menu in under a minute.
Key Takeaways
- DNS settings live in your router or on individual devices, and changing them at the router level affects all devices on your network at once.
- Cloudflare (1.1.1.1), Quad9 (9.9.9.9), and OpenDNS are common alternatives that block malware sites or offer privacy features.
- You need two DNS addresses to enter: a primary and a secondary, which your device uses if the first one is unreachable.
- Test a new DNS service for a few days before deciding it is faster or slower than your current one, because speed varies by time of day and location.
Changing DNS on your router affects all devices at once
The easiest way to change DNS is at your router, because the change applies to every phone, laptop, and smart TV on your network without touching each one individually. Log into your router's admin panel by opening a web browser and typing 192.168.1.1 or 192.168.0.1 into the address bar. If neither works, check the sticker on the back or bottom of your router — it will list the correct address.
Enter your router's username and password. If you have never changed these, they are usually printed on the router itself — often "admin" and "admin" or "admin" and the router's serial number. Once you are logged in, look for a section called DNS, DNS Settings, or WAN Settings. The exact name depends on your router brand.
You will see fields for Primary DNS and Secondary DNS. Write down your current DNS addresses before you change them — usually they are your provider's addresses — so you can switch back if needed. Then enter the new DNS addresses. For Cloudflare, use 1.1.1.1 and 1.0.0.1. For Quad9, use 9.9.9.9 and 149.112.112.112. For OpenDNS, use 208.67.222.222 and 208.67.220.220. Save the changes and restart your router by unplugging it for 30 seconds.
Changing DNS on individual devices
If you want to use different DNS on one device without affecting others, or if you cannot access your router settings, you can change DNS on the device itself. The steps differ by operating system.
On Windows: Open Settings, go to Network & Internet, then Advanced Network Settings. Scroll down to DNS Server Settings and click Edit. Toggle "Automatic" to off, then enter your primary and secondary DNS addresses. Click Save.
On Mac: Open System Settings, go to Network, select your Wi-Fi connection, then click Details. Go to the DNS tab, click the plus button to add a new DNS server, and enter the address. Repeat for the secondary DNS. Click OK.
On iPhone or iPad: Open Settings, go to Wi-Fi, tap the network you are connected to, then tap Configure DNS. Choose Manual, tap Add Server, and enter the primary DNS address. Repeat for the secondary. Tap Save.
On Android: Open Settings, go to Wi-Fi, long-press your network, tap Modify, then tap Advanced Options. Scroll down to IP Settings and change it from DHCP to Static. Scroll further to find DNS 1 and DNS 2 fields and enter your addresses. Tap Save.
Popular DNS services and what they do
Cloudflare (1.1.1.1) is fast and blocks malware by default. It does not log your browsing history, though Cloudflare does keep some technical data for 24 hours to detect attacks. It is free and requires no account. Cloudflare also offers a paid version called 1.1.1.1 for Families that blocks adult content and phishing sites in addition to malware.
Quad9 (9.9.9.9) blocks malware, phishing, and botnet sites. It is run by a nonprofit and does not log which sites you visit. It is free and requires no account. Quad9 is slightly slower than Cloudflare for most users but offers stronger privacy guarantees.
OpenDNS (208.67.222.222) offers a free version that blocks phishing and malware, plus a paid version with parental controls and content filtering. The free version does not require an account. OpenDNS is owned by Cisco and has been around longer than most alternatives.
Google Public DNS (8.8.8.8) is fast and reliable but logs your queries for 24 hours and keeps some data longer. It does not block malware by default. Use it if speed matters more to you than privacy, or if you want a fallback that almost always works.
Testing whether a new DNS is actually faster
DNS speed matters only if your current provider is slow, which is rare. But if you want to test, use a tool like DNS Benchmark on Windows or Namebench on Mac. These tools measure how long it takes each DNS service to respond to requests from your location.
Run the test at different times of day — morning, afternoon, and evening — because DNS speed varies. A service that is faster at 10 a.m. might be slower at 7 p.m. Test for at least three days before deciding a new service is genuinely faster, because one-time results can be misleading.
In practice, most people will not notice a speed difference between major DNS services. If your pages load noticeably faster after switching, it is usually because the new service blocks ads or malware sites that were slowing things down, not because the DNS itself is faster.
Switching back to your provider's DNS
If you change DNS and something stops working — a website will not load, your printer will not connect, or your smart home devices lose connection — switch back to your provider's DNS when ready. Write down your provider's DNS addresses before you change them so you can restore them quickly.
To find your provider's DNS addresses, log back into your router and look for the original values, or call your provider and ask. Most providers use their own DNS servers, but some use Cloudflare or OpenDNS by default. Once you have the addresses, follow the same steps you used to change DNS the first time, enter the original addresses, and save.
If you changed DNS on individual devices instead of at the router, the process is the same: go back to the DNS settings on that device and enter your provider's addresses or toggle back to Automatic.
Frequently Asked Questions
Will changing DNS make my internet faster?
Probably not noticeably. DNS speed matters only if your current provider is very slow, which is uncommon. If pages load faster after switching, it is usually because the new service blocks malware or ads, not because DNS itself is faster. Test with a DNS benchmark tool if speed is your main goal.
Can I use different DNS on different devices?
Yes. You can change DNS at the router level to affect all devices, or on individual devices to use different services on each one. If you change DNS on one device, the others will still use whatever DNS is set at the router level.
What happens if my DNS server goes down?
Your device automatically tries the secondary DNS address you entered. If both are down, your device will not be able to reach any websites until one comes back online. This is why you should always enter a secondary DNS address — it acts as a backup.
Do I need to restart my device after changing DNS?
If you change DNS at the router, restart the router by unplugging it for 30 seconds. If you change DNS on an individual device, you usually do not need to restart, but restarting will clear any cached DNS data and may support the change takes effect when ready.
Is it safe to change DNS?
Yes. Changing DNS is safe and does not affect your security or internet connection. If something goes wrong, you can switch back to your provider's DNS in the same settings menu. There is no risk of damaging your device or network.