Optimizing Your Network by Changing DNS Servers

Updated on October 29, 2025, by ITarian

how to change dns server

Is your internet connection slower than expected, or do you encounter frequent browsing issues? The problem might not be your Wi-Fi or ISP—it could be your DNS. Understanding how to change DNS server can dramatically improve internet speed, privacy, and security.

The DNS (Domain Name System) acts as the internet’s phonebook, translating human-readable website names like www.google.com into IP addresses your computer understands. However, default DNS servers provided by ISPs are often slow, unreliable, or insecure.

Whether you’re a cybersecurity expert, IT manager, or CEO managing digital operations, switching to a better DNS can make your systems faster, more secure, and resilient against attacks. This article explains what DNS is, why changing it matters, and how to configure it across devices and networks.


What Is a DNS Server?

A DNS server converts domain names into IP addresses. For example, when you type “www.itarian.com” in your browser, the DNS resolves it to an IP address that connects your computer to the correct web server.

Without DNS, you’d have to memorize complex strings of numbers like 104.21.3.91—which is not practical.

How DNS Works in Simple Terms:

  1. You enter a website address in your browser.

  2. The request goes to a DNS server.

  3. The server finds the matching IP address.

  4. Your device connects to the website’s server.

When your DNS server is slow, websites take longer to load. If it’s compromised, your privacy could be at risk.


Why Change Your DNS Server?

Changing your DNS server can have a big impact on speed, security, and reliability.

1. Improve Internet Speed

Some DNS servers respond faster than others. Switching to optimized DNS services like Google DNS or Cloudflare DNS can reduce latency and improve load times.

2. Increase Security

DNS-based attacks like pharming or DNS spoofing can redirect users to fake websites. Secure DNS providers use DNS over HTTPS (DoH) or DNS over TLS (DoT) to encrypt queries and prevent interception.

3. Enhance Privacy

ISPs can log and sell your browsing data. Using a privacy-focused DNS like Cloudflare (1.1.1.1) ensures your queries aren’t tracked or stored.

4. Access Restricted Content

Sometimes, ISPs block specific websites. Alternate DNS servers bypass regional restrictions for greater freedom online.

5. Fix Connection Issues

If you can’t access certain sites or experience frequent DNS errors, changing servers often resolves these problems.


Popular DNS Servers to Consider

Here are some of the best public DNS servers you can use in 2025:

Provider Primary DNS Secondary DNS Key Features
Google DNS 8.8.8.8 8.8.4.4 Fast, reliable, global coverage
Cloudflare DNS 1.1.1.1 1.0.0.1 Privacy-first, encrypted DNS
OpenDNS 208.67.222.222 208.67.220.220 Phishing protection, parental control
Quad9 DNS 9.9.9.9 149.112.112.112 Blocks malicious domains
Comodo Secure DNS 8.26.56.26 8.20.247.20 Security-oriented, threat filtering

Tip: For cybersecurity professionals, Quad9 and Comodo Secure DNS are top choices due to their malware and phishing protection features.


How to Change DNS Server on Windows

Changing the DNS server in Windows is simple and can be done through the Network Settings or Control Panel.

Method 1: Using Windows Settings (Windows 10 & 11)

  1. Press Windows + I to open Settings.

  2. Go to Network & Internet → Wi-Fi (or Ethernet).

  3. Select your connected network.

  4. Scroll to DNS server assignment → click Edit.

  5. Choose Manual, and toggle IPv4 on.

  6. Enter your preferred DNS servers, for example:

    • Preferred DNS: 8.8.8.8

    • Alternate DNS: 8.8.4.4

  7. Click Save.

You can also enable DNS over HTTPS (DoH) for extra privacy.


Method 2: Using Control Panel (All Versions of Windows)

  1. Press Windows + R, type ncpa.cpl, and hit Enter.

  2. Right-click your network connection → Properties.

  3. Select Internet Protocol Version 4 (TCP/IPv4)Properties.

  4. Choose Use the following DNS server addresses.

  5. Enter the preferred and alternate DNS values.

  6. Click OK, then restart your connection.

For IPv6, use the following:

  • Google DNS (IPv6): 2001:4860:4860::8888 and 2001:4860:4860::8844


Method 3: Using Command Prompt (Advanced Users)

For IT administrators, the Command Prompt allows DNS changes via automation.

  1. Open Command Prompt as Administrator.

  2. Type the following commands:

    netsh interface ipv4 set dns name="Wi-Fi" static 8.8.8.8
    netsh interface ipv4 add dns name="Wi-Fi" 8.8.4.4 index=2
  3. Verify your settings:

    ipconfig /all

This method is ideal for batch scripts or managing multiple machines in an enterprise environment.


How to Change DNS Server on macOS

Steps:

  1. Click the Apple logo → System Settings → Network.

  2. Select your connection (Wi-Fi or Ethernet).

  3. Click Details → DNS.

  4. Click the + button and add your new DNS servers:

    • 1.1.1.1 and 1.0.0.1 for Cloudflare

    • Or 8.8.8.8 and 8.8.4.4 for Google

  5. Click OK → Apply.

macOS will now route DNS requests through your preferred servers, improving performance and security.


How to Change DNS Server on Android

  1. Open Settings → Network & Internet → Internet.

  2. Tap your active network.

  3. Scroll to Advanced → Private DNS.

  4. Select Private DNS provider hostname.

  5. Enter your provider’s DoH hostname:

    • Cloudflare: 1dot1dot1dot1.cloudflare-dns.com

    • Google: dns.google

  6. Tap Save.

Now your Android device encrypts DNS queries for better privacy.


How to Change DNS Server on iPhone/iPad

  1. Go to Settings → Wi-Fi.

  2. Tap the i (info) icon next to your network.

  3. Scroll to Configure DNS → choose Manual.

  4. Remove old servers and add new ones, such as:

    • 1.1.1.1

    • 1.0.0.1

  5. Tap Save.

Your iPhone will now use the new DNS servers for all Wi-Fi connections.


How to Change DNS Server on Your Router

Changing DNS on your router applies the settings to all connected devices—ideal for enterprise networks or homes with multiple users.

Steps:

  1. Open a browser and enter your router’s IP address (usually 192.168.1.1 or 192.168.0.1).

  2. Log in with your admin credentials.

  3. Find DNS Settings (under Network, Internet, or WAN).

  4. Replace the existing DNS entries with your preferred ones.

  5. Save and reboot the router.

Tip:
For corporate setups, use DNS servers with enterprise filtering, like Comodo or Quad9, to block phishing and malware domains.


Using DNS for Cybersecurity and Privacy

Changing DNS isn’t just about speed—it’s a key cybersecurity move.

1. Block Malicious Websites

Security-focused DNS providers maintain blacklists of known malware or phishing domains, protecting your devices automatically.

2. Prevent DNS Hijacking

Encrypted DNS protocols like DNS over HTTPS (DoH) protect your queries from being intercepted or tampered with.

3. Enforce Compliance Policies

IT administrators can use managed DNS to enforce content filtering, ensuring safe browsing across the organization.

4. Improve Endpoint Security

Integrating secure DNS with endpoint protection tools (like ITarian) provides layered defense against web-based attacks.


Common DNS Problems and Solutions

Issue Possible Cause Fix
Slow browsing speed Overloaded DNS servers Switch to faster servers like Cloudflare or Google
DNS not responding Misconfigured settings Reset to automatic or re-enter DNS addresses
Website not loading Cached DNS data Run ipconfig /flushdns in Command Prompt
Unable to access restricted sites ISP DNS filtering Use alternate DNS with privacy features

Testing Your New DNS Configuration

After you change your DNS, it’s important to verify that it’s working correctly.

1. Using Command Prompt (Windows):

nslookup www.google.com

The response will display your active DNS server.

2. Online DNS Test Tools:

  • DNS Leak Test (dnsleaktest.com)

  • Google’s Public DNS Test

  • Cloudflare Diagnostics Tool

These confirm whether your DNS change was successful and whether your queries are secure.


Best Practices for Managing DNS in Business Environments

  1. Use Centralized DNS Management: Employ tools like ITarian to configure and monitor DNS settings across endpoints.

  2. Implement DNS Encryption: Adopt DNS over HTTPS (DoH) or DNS over TLS (DoT) for secure communication.

  3. Monitor Logs: Track DNS requests to detect suspicious traffic or data exfiltration attempts.

  4. Backup Router Configurations: Always keep a backup before making DNS changes.

  5. Educate Users: Train employees to recognize DNS-related phishing or hijacking attempts.


Frequently Asked Questions (FAQ)

1. What is the best DNS server for speed and privacy?

Cloudflare (1.1.1.1) is considered one of the fastest and most privacy-focused DNS providers.

2. Does changing DNS affect my internet connection?

Yes—positively. It can improve browsing speed and reliability but doesn’t change your IP address.

3. Can I use multiple DNS servers?

Yes. You can set a primary and secondary DNS server as a backup.

4. Is it safe to change DNS servers?

Absolutely. Just make sure you use reputable DNS providers like Google, Cloudflare, or Comodo Secure DNS.

5. Why does my DNS revert after restart?

If your router or ISP forces automatic DNS configuration, set your DNS directly on your device instead.


Final Thoughts

Learning how to change DNS server is a simple yet powerful way to improve speed, strengthen security, and enhance online privacy. Whether for individual use or enterprise-level IT management, switching to a trusted DNS provider ensures smoother, safer, and more reliable connectivity.

For professionals managing networks or securing endpoints, combining DNS security with advanced endpoint protection tools is the ultimate strategy for cyber resilience.

Start your free trial with ITarian today.

See ITarian’s IT Management Platform in Action!
Request Demo

Top Rated IT Management Platform
for MSPs and Businesses

Newsletter Signup

Please give us a star rating based on your experience.

1 vote, average: 5.00 out of 51 vote, average: 5.00 out of 51 vote, average: 5.00 out of 51 vote, average: 5.00 out of 51 vote, average: 5.00 out of 5 (1 votes, average: 5.00 out of 5, rated)Loading...
Become More Knowledgeable