How to Change DNS on Windows: A Step-by-Step Guide

Server-Hero-Network-Cable-Port.jpg

Key Takeaways:

  • Manual DNS configuration is useful for testing, troubleshooting, or improving internet performance.
  • DNS changes can be made through Control Panel, Settings, or PowerShell depending on preference and environment.
  • PowerShell is ideal for automation or repeated changes across multiple machines.
  • In domain environments, manual DNS changes may affect access to resources, so caution is important.

Learn how to change DNS on Windows, using either the GUI or command-line with PowerShell.

The most common scenario on enterprise computers is for DNS addresses to be handled by either DHCP servers or another IP address management solution. If you have not needed to change this configuration on one or more computers in a while, this guide will help refresh your memory. I will cover both Windows client and server operating systems.

For this guide, I demonstrate how to manually assign alternate DNS settings. Using DHCP to manage DNS is outside the scope of this article.

How to change DNS on Windows 10

What if you could change how your Windows 10 device finds every website with just a few clicks? The steps below show the most common ways to modify DNS settings manually.

Pros and cons of each method

MethodProsCons
Control PanelWorks everywhere, familiar layout, stable interfaceSlower for repeated changes
Settings appModern interface, easier to find for many usersNot consistent across all Windows 10 builds
PowerShellGreat for scripting, fast for advanced users, supports automationRequires command knowledge and careful selection of interface index
Different ways to change DNS settings in Windows

Using Control Panel

  • I am on my Windows 10 client machine. Let me click the Start button, type “control,” then select Control Panel.
The Windows 10 Control Panel
The Windows 10 Control Panel – Image Credit: Michael Reinders/Petri.com
  • Your Control Panel view may differ, but you can locate the Network and Sharing Center or Network Connections.
The Network and Sharing Center
The Network and Sharing Center – Image Credit: Michael Reinders/Petri.com
  • Look for your primary connection. It is often the one on the domain network, meaning the network adapter is associated with the computer’s domain membership.
  • Click the Ethernet or Wi-Fi link next to Connections, or select Change adapter settings on the left.
  • Select Properties at the bottom.
  • Then select Internet Protocol Version 4 (TCP/IPv4) and click Properties again.
Showing the Network properties for my network connection including DNS settings
Showing the Network properties for my network connection including DNS settings – Image Credit: Michael Reinders/Petri.com
  • This system already has a manually assigned IP configuration. If I wanted to test a specific website or internet-based app, instead of relying on my domain’s DNS servers, I could manually change the DNS to Google Public DNS (8.8.8.8).
Manually changing the DNS server to Google's (8.8.8.8)
Manually changing the DNS server to Google’s (8.8.8.8) – Image Credit: Michael Reinders/Petri.com

That completes the process.

Using PowerShell

If you prefer command-line tools, here is how to view and change DNS settings using PowerShell. Open your preferred terminal and run this command to view the current configuration:

Get-DnsClientServerAddress
Using Get-DnsClientServerAddress (PowerShell) to view DNS settings
Using Get-DnsClientServerAddress (PowerShell) to view DNS settings – Image Credit: Michael Reinders/Petri.com

To remove the second DNS entry and change the first entry to 8.8.8.8, use the following command. Run PowerShell as an administrator.

Set-DNSClientServerAddress -InterfaceIndex 7 -ServerAddresses 8.8.8.8
Using Set-DnsClientServerAddress to change DNS settings with PowerShell
Using Set-DnsClientServerAddress to change DNS settings with PowerShell – Image Credit: Michael Reinders/Petri.com

Run Get-DnsClientServerAddress again to confirm the change.

How to change DNS on Windows 11

What if Windows 11 gave you an even easier way to adjust DNS settings? Let’s walk through the options.

Using Windows Settings

  • Open Start → Settings → Network & internet.
The Network & internet settings in Windows 11
The Network & internet settings in Windows 11 – Image Credit: Michael Reinders/Petri.com
  • Select the Properties link.
  • You can view your IPv4 DNS servers in the middle of the screen.
  • Select Edit to adjust the values.
How to change DNS on Windows 11's new Settings interface
How to change DNS on Windows 11’s new Settings interface – Image Credit: Michael Reinders/Petri.com
  • Change the DNS server to 8.8.8.8 and save.

Using PowerShell

We can use the same cmdlets that work on Windows 10.

Get-DnsClientServerAddress

This displays both IPv4 and IPv6 DNS settings.

  • To change to Google’s DNS server:
Set-DnsClientServerAddress -InterfaceIndex 12 -ServerAddresses 8.8.8.8
Again changing DNS Server settings to Google in PowerShell
Again changing DNS Server settings to Google in PowerShell – Image Credit: Michael Reinders/Petri.com

Run Get-DnsClientServerAddress again to confirm.

How to change DNS on Windows Server (Core)

What if server environments handled DNS changes just as easily? Fortunately, they do. Here are the methods for Windows Server.

Using SConfig (Windows Server Core)

On Windows Server installations with Server Core, you can adjust DNS settings using SConfig.

  • On the main menu, select option 8 for Network settings.
SConfig in Windows Server 2022 Core
SConfig in Windows Server 2022 Core – Image Credit: Michael Reinders/Petri.com
  • I will choose index 1 because it is my only network adapter.
Screenshot 2023 12 13 151627
Network adapter settings in SConfig in Windows Server 2022 Core – Image Credit: Michael Reinders/Petri.com
  • This view shows familiar settings including IP addresses and DNS server entries.
  • Choose option 2 to adjust DNS servers.
Adjusting DNS Server settings in SConfig
Adjusting DNS Server settings in SConfig – Image Credit: Michael Reinders/Petri.com
  • After making the changes, I reselected option 8 to verify the updates.
Verifying the DNS Server change in SConfig
Verifying the DNS Server change in SConfig – Image Credit: Michael Reinders/Petri.com

Everything looks correct.

Using PowerShell

You can also view DNS settings using PowerShell on Windows Server 2022.

Get-DnsClientServerAddress
Using PowerShell in Windows Server Core to check DNS Server settings
Using PowerShell in Windows Server Core to check DNS Server settings – Image Credit: Michael Reinders/Petri.com

Those addresses match the DNS servers used by my domain controllers. To change to Google’s DNS server:

Set-DnsClientServerAddress -InterfaceIndex 3 -ServerAddresses 8.8.8.8
Changing and verifying DNS changes
Changing and verifying DNS changes – Image Credit: Michael Reinders/Petri.com

I ran Get-DnsClientServerAddress again to confirm the change was successful.

Conclusion

Changing DNS server settings in Windows is a straightforward way to troubleshoot TCP/IP issues or adjust performance temporarily. Whether you need to address connectivity problems or optimize your network setup, the ability to modify DNS settings is a powerful troubleshooting tool.

Choose reliable DNS servers and consider speed, security, and organizational policies when adjusting DNS configurations. As demonstrated, you have several methods to view and modify DNS settings across Windows versions.

What is DNS?

What if every website required you to remember a string of numbers instead of a name? That is the problem DNS solves. DNS is an acronym for Domain Name System, a long-standing decentralized naming system for computer networks across the globe. Devices that use DNS include desktops, laptops, servers, televisions, IoT devices, and many more.

DNS translates domain names into IP addresses so computers know where to connect. It also provides information for services such as email routing and other domain-related details.

You may find it useful to use an alternate DNS provider to troubleshoot security or performance issues. Popular public DNS providers include OpenDNS, Cloudflare, and Google DNS.

What configuration should I use, manual or automatic?

Should you assign DNS servers manually, or let something else do it? There are two main approaches. You can manually assign DNS servers on each device, or allow a system to assign them automatically. DHCP, the most common system for this, provides an easier setup and better long-term administration. You enter DNS details on the DHCP server, and client machines inherit the configuration without manual change.

One note of caution. Before switching a device from DHCP to manual DNS, you should confirm whether the change is appropriate. On Active Directory domain-joined devices, modifying DNS settings may disrupt access to directory services and other key network resources because Active Directory and DNS are tightly integrated.

Frequently asked questions

How do I reset DNS settings back to automatic?

You can select “Obtain DNS server address automatically” in your adapter’s IPv4 properties or run PowerShell with DHCP parameters on the correct interface.

Will changing DNS make my internet faster?

In some cases, yes. Public DNS providers may respond more quickly than ISP-provided DNS servers. Results vary based on network location.

Why can’t I change DNS in Windows 10?

This may happen if your organization manages device settings, if you lack administrator rights, or if your network adapter has restrictions applied by group policy.

Does using Google DNS or Cloudflare DNS increase privacy?

These providers may offer better privacy controls than ISP DNS, but they still receive your DNS queries. You should review each provider’s privacy policy.

Is it safe to change DNS on my computer?

Yes, changing DNS is safe. If you enter an incorrect DNS server address, domain names may not resolve, but you can revert to automatic DNS at any time.