How-To Guides

How to Change Your DNS Server

This guide changes the DNS server a computer or network uses so name lookups run through a faster and more private resolver such as Cloudflare 1.1.1.1 or Google 8.8.8.8. The result is a device or whole network that resolves website names through the chosen provider rather than the internet provider default. A DNS server translates a typed website name into the numeric IP address a device connects to, and the resolver used affects lookup speed, privacy, and filtering.

The process moves through five phases: choosing a DNS provider, changing the DNS on Windows, changing the DNS on the router, flushing the DNS cache, and verifying the change. A change on Windows affects one computer, while a change on the router applies to every device on the network.

Each phase names the exact setting, address, and command involved. Follow the phases in order, because the cache flush in phase four clears old records that would otherwise hide the new resolver.

What You Need to Change Your DNS Server

A DNS change requires the details and access below before any setting is edited. Confirm each item first so the change applies cleanly.

What You Need to Change Your DNS Server - How to Change Your DNS Server
  • The DNS addresses to use. Cloudflare uses 1.1.1.1 and 1.0.0.1, Google uses 8.8.8.8 and 8.8.4.4, and Quad9 uses 9.9.9.9.
  • Administrator access on Windows. Editing adapter properties requires an account with administrator rights.
  • The router admin login. Changing DNS for the whole network requires the router admin page at the default gateway address.
  • A command window for the cache flush. The ipconfig command runs in Command Prompt or Windows Terminal.
  • A note of the current DNS values. Recording the existing addresses allows a return to the provider default if needed.

Choose a DNS Provider

Choosing a DNS provider decides which resolver every lookup runs through and what speed, privacy, and filtering the network gets. The three public resolvers below are free and widely used.

  • Cloudflare uses 1.1.1.1 and 1.0.0.1. Cloudflare focuses on lookup speed and states it does not sell browsing data.
  • Google uses 8.8.8.8 and 8.8.4.4. Google Public DNS offers wide reach and stable performance across regions.
  • Quad9 uses 9.9.9.9 and 149.112.112.112. Quad9 blocks known malicious domains at the resolver level for added security.
  • Cloudflare for Families uses 1.1.1.2. This variant filters malware, and 1.1.1.3 also filters adult content for household use.

The provider sets the trade-off between raw speed, privacy policy, and built-in filtering. The role each resolver plays in turning a name into an address is covered in the overview of what DNS is.

Change the DNS Server on Windows

Changing the DNS on Windows points one computer at the chosen resolver through its network adapter properties. The IPv4 and IPv6 settings each hold their own DNS fields.

Change the DNS Server on Windows - How to Change Your DNS Server
  1. Open Settings, then Network and Internet, then select the active Ethernet or Wi-Fi connection.
  2. Find the DNS server assignment and select Edit, then choose Manual.
  3. Turn on IPv4 and enter the preferred DNS, such as 1.1.1.1, and the alternate, such as 1.0.0.1.
  4. Turn on IPv6 and enter the matching IPv6 addresses if the provider lists them, then save.
  5. Open Control Panel, Network Connections, adapter Properties, and Internet Protocol Version 4 on older Windows builds that lack the Settings option.

The preferred DNS is tried first, and the alternate answers if the first does not respond. A change here affects only the computer being edited.

Change the DNS Server on the Router

Changing the DNS on the router applies the chosen resolver to every device on the network at once. The router passes the DNS addresses to devices through DHCP, so no per-device edit is needed.

  1. Open a browser and sign in to the router admin page at the default gateway address.
  2. Open the Internet, WAN, or DHCP settings section.
  3. Find the DNS fields, often labeled primary and secondary DNS server.
  4. Enter the chosen addresses, such as 8.8.8.8 and 8.8.4.4, and save.
  5. Reboot the router or reconnect each device so it receives the new DNS through DHCP.

A router-level change covers phones, smart devices, and computers without touching each one. A device set to manual DNS keeps its own values and ignores the router setting.

Flush the DNS Cache

Flushing the DNS cache removes the old records Windows stored so the next lookup uses the new resolver. The ipconfig command clears the local cache in one step.

  1. Press the Windows key, type cmd, and open Command Prompt.
  2. Type ipconfig /flushdns and press Enter.
  3. Read the confirmation that the DNS Resolver Cache was flushed.
  4. Restart the browser so it drops any cached lookups of its own.
  5. Run ipconfig /flushdns again after any further DNS change.

A stale cache makes a site resolve through the old server even after the change. The flush forces a fresh lookup through the new provider on the next request.

Verify the New DNS Server

Verifying the change confirms lookups now run through the chosen resolver rather than the old one. The nslookup command and a provider help page both report the active DNS.

  1. Open Command Prompt and type nslookup example.com, then read the Server line at the top of the result.
  2. Confirm the Server address matches the chosen resolver, such as 1.1.1.1.
  3. Visit the Cloudflare help page at 1.1.1.1/help to confirm the connection uses Cloudflare when that resolver is set.
  4. Open several websites to confirm name resolution still works normally.
  5. Repeat nslookup on a second device when the change was made on the router.

Change the DNS Server on macOS and Mobile

Changing the DNS on macOS, iPhone, or Android points that single device at the chosen resolver from its own network settings. Each system holds the DNS fields in a different menu, and the change applies to that device alone.

  • On macOS, open System Settings. Select Network, choose the active connection, open Details, select DNS, and add 1.1.1.1 or 8.8.8.8 to the DNS Servers list.
  • On iPhone, open the Wi-Fi network. Tap the connected network, tap Configure DNS, switch to Manual, and add the chosen resolver addresses.
  • On Android, edit the private DNS option. Open Network and internet, select Private DNS, and enter a provider hostname such as dns.google or one.one.one.one.
  • On any device, remove the old entries. Delete the provider default addresses so only the chosen resolver remains in the list.

A per-device change overrides the router DNS on that device only. Other devices keep the resolver set on the router until each one is edited the same way.

Enable Encrypted DNS with DNS over HTTPS

Enabling DNS over HTTPS encrypts each name lookup so the request cannot be read or altered between the device and the resolver. Standard DNS sends lookups in plain text, while DoH and DNS over TLS wrap them in an encrypted connection.

  1. Open Settings, Privacy and security, then the DNS over HTTPS option in a current Windows build.
  2. Set the DNS server to a resolver that supports DoH, such as 1.1.1.1 or 8.8.8.8.
  3. Choose the encrypted option so Windows sends lookups over HTTPS rather than plain text.
  4. In a browser, open the security settings and enable Secure DNS with the same provider for browser-level encryption.
  5. On Android, use the Private DNS hostname field, which enables DNS over TLS for every app.

Encrypted DNS hides the list of visited site names from anyone watching the connection. The resolver still sees each lookup, so the provider privacy policy still matters.

Benefits of Changing Your DNS Server

A different DNS resolver changes three measurable aspects of how the network behaves. The benefits below explain why a change is made.

  • Faster lookups. A resolver with servers near the user can answer name queries faster than a slow provider default.
  • Stronger privacy. Providers such as Cloudflare state they do not sell browsing data, unlike some internet provider resolvers.
  • Built-in security. Quad9 and Cloudflare for Families block known malicious or unwanted domains before they load.
  • Content filtering. Family-focused resolvers filter adult or malware domains at the network level for every device.

Common Mistakes to Avoid

  • Skipping the cache flush. An unflushed cache makes sites resolve through the old server and hides the change.
  • Entering only one address. A missing alternate DNS leaves no backup if the primary resolver does not respond.
  • Mixing providers across fields. Pairing one provider primary with another provider secondary complicates troubleshooting.
  • Forgetting IPv6. Leaving IPv6 on the old resolver routes some lookups around the new server.
  • Editing the device when the router was intended. A manual device DNS overrides the router setting and applies to that device only.

Key Takeaways

  • Pick a resolver for the goal. Cloudflare 1.1.1.1 favors speed, and Quad9 9.9.9.9 favors security filtering.
  • Edit Windows for one computer. The adapter DNS fields change the resolver on that device only.
  • Edit the router for every device. A router DNS change reaches all devices through DHCP.
  • Flush the cache. The ipconfig /flushdns command clears old records so the new server takes effect.
  • Verify with nslookup. The Server line confirms which resolver now answers lookups.

What is the fastest DNS server to use?

Cloudflare 1.1.1.1 is built for low lookup latency and ranks among the fastest public resolvers. Actual speed depends on the user location and the nearest server, so testing more than one is useful.

Is changing my DNS server safe?

Yes. Changing to a reputable public resolver such as Cloudflare, Google, or Quad9 is safe. These services are widely used, and the original addresses can be restored at any time.

Does changing DNS make the internet faster?

A faster resolver speeds up name lookups, which can make pages start loading sooner. It does not raise the connection bandwidth, so large downloads run at the same provider speed.

Should I change DNS on Windows or the router?

Change it on the router to cover every device through DHCP. Change it on Windows to affect one computer or to override the router setting on a single device.

Why do I need to flush the DNS cache?

Windows stores past lookups in a cache. Without flushing, sites keep resolving through the old server. The ipconfig /flushdns command clears the cache so the new resolver is used.

What is the difference between primary and secondary DNS?

The primary, or preferred, DNS server is queried first. The secondary, or alternate, answers only when the primary does not respond, providing a fallback for name resolution.

Last Thoughts on Changing Your DNS Server

A DNS server is changed by choosing a resolver such as Cloudflare 1.1.1.1 or Google 8.8.8.8, entering it in the Windows adapter properties or the router admin page, flushing the cache with ipconfig /flushdns, and verifying with nslookup. The resolver controls how a name becomes an address, so the choice affects speed, privacy, and filtering for every lookup. The address a resolver returns is explained in the overview of what an IP address is.

Confirming the gateway used to reach the router is covered in the guide to find an IP address, and a network that shows no internet after a DNS edit is addressed in the steps to fix no internet connection. The collected configuration guides sit on the PC tutorials hub.

Nizam Ud Deen

Nizam Ud Deen is the founder of theCoreiTech, a tech-focused platform dedicated to simplifying the world of computers, hardware, and digital innovation. With nearly a decade of experience in digital marketing and IT, Nizam combines strategic marketing insight with deep technical understanding. As a passionate entrepreneur, he has built multiple successful digital products and online ventures, helping bridge the gap between technology and everyday users. His mission through theCoreiTech is to empower readers to make informed decisions about computers, hardware, and emerging tech trends through clear, data-driven, and actionable content.

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button