How to Change DNS Settings on Windows 11

Changing the DNS on Windows 11 can fix the Internet connection

by Loredana Harsana
Loredana Harsana
Loredana Harsana
Managing Editor
Loredana is a passionate writer with a keen interest in PC software and technology. She started off writing about mobile phones back when Samsung Galaxy S II was... read more
Reviewed by Alex Serban
Alex Serban
Alex Serban
Windows Server & Networking Expert
After moving away from the corporate work-style, Alex has found rewards in a lifestyle of constant analysis, team coordination and pestering his colleagues. Holding an MCSA Windows Server... read more
Affiliate Disclosure
  • You can change the DNS Settings on your Windows 11 PC and manually choose your preferred DNS servers for browsing.
  • Choosing DNS servers manually ensures better privacy and security than the default DNS provided by your ISP.
  • Using Control Panel and the Settings app are the most efficient ways to change DNS Settings on Windows 11.
change DNS Settings on Windows 11

To fix various PC problems, we recommend Restoro PC Repair Tool:
This software will repair common computer errors, protect you from file loss, malware, hardware failure and optimize your PC for maximum performance. Fix PC issues and remove viruses now in 3 easy steps:

  1. Download Restoro PC Repair Tool that comes with Patented Technologies (patent available here).
  2. Click Start Scan to find Windows issues that could be causing PC problems.
  3. Click Repair All to fix issues affecting your computer's security and performance
  • Restoro has been downloaded by 0 readers this month.

Your ISP configuration provides a default Domain Name System (DNS) when setting up your internet connection. This poses all sorts of security threats and slows the internet speed making it necessary to manually assign the DNS servers.

Go through this detailed guide to learn how to change DNS settings on Windows 11 computers and secure your online presence.  

How can I change the DNS settings on Windows 11? 

1. Use the Settings app

  1. Head over to the Settings app using the Windows + I shortcut.
  2. Select Network & internet from the left sidebar and choose Wi-Fi or Ethernet from the right section, depending on your internet connection.Change DNS Settings on Windows 11
  3. Scroll down and select Hardware properties.Change DNS Settings on Windows 11
  4. Locate the DNS server assignment setting and click the Edit button next to it.Change DNS Settings on Windows 11
  5. This will open the Edit DNS settings popup. Here, expand the drop-down on the top and choose Manual instead of Automatic (DHCP).
  6. Next, enable the toggle for either IPv4 or IPv6, based on the IP connection type. Change DNS Settings on Windows 11
  7. Now provide the primary DNS server address in the Preferred DNS field followed by a secondary DNS server address in the Alternate DNS field. (For instance, is the preferred DNS address, and alternative DNS address for Google’s DNS server)Change DNS Settings on Windows 11
  8. If you wish to enable the DNS over HTTPS feature to encrypt DNS requests, choose Encrypted only (DNS over HTTPS) for both Preferred DNS Encryption and Alternate DNS Encryption dropdowns.Change DNS Settings on Windows 11
  9. Press the Save button once you are done with the changes. 

You can easily change DNS settings on Windows 11 via the Settings app to speed up the browsing and avoid security issues. Enabling Encryption and defining the DNS with IPv4 and IPv6 protocols ensures that the network communication is much more secure. 

Note icon
Before you change the DNS settings on Windows 11 PC, ensure that your ISP supports manual DNS servers and is not configured by default to use the ISP’s DNS servers only.

2. Use Control Panel 

  1. Use the Windows + R shortcut to launch the Run command window, type the following command and press OK. This will directly open the Network Connections in Control Panel. ncpa.cplChange DNS Settings on Windows 11
  2. Right-click the Wi-Fi or Ethernet connection, depending on your connection type, and choose Properties from the context menu.Change DNS Settings on Windows 11
  3. This will open the Wi-Fi Properties window. Double-click the Internet Protocol Version 4 (TCP/IPv4) located under the This connection uses the following items section.Change DNS Settings on Windows 11
  4. On the new popup, enable Use the following DNS server addresses option and provide the Preferred DNS server and Alternative DNS server addresses in their respective fields. (For instance, to use Cloudflare DNS servers, assign as Preferred DNS and as Alternative DNS).Change DNS Settings on Windows 11 
  5. Press the OK button to save the changes. 

Many of our readers prefer Control Panel to change the DNS settings of their Windows 11 PC. Though it is one of the oldest ways to configure DNS settings, it does not allow you to enable DNS encryption for the servers.

3. Use Command Prompt

  1. Press the Windows key, type cmd in the search bar, and choose Run as administrator, located on the right pane.Change DNS Settings on Windows 11
  2. Click the Yes button on the User Access Control popup.
  3. In the Command Prompt window, type or copy-paste the following command and press the Enter key. Replace Preferred DNS with the primary DNS address of your preferred server. netsh interface ipv4 set dnsservers Wi-Fi Static Preferred DNS primaryChange DNS Settings on Windows 11
  4. Next, type or copy-paste the below command to assign an alternate DNS server and press the Enter key. Replace Alternate DNS with the secondary DNS server address.  netsh interface ipv4 add dnsservers Wi-Fi Alternate DNS index=2Change DNS Settings on Windows 11
  5. To reset the Manual DNS settings to Automatic (DHCP), type the following command and press the Enter key. netsh interface ip set dns "Local Area Connection" dhcpChange DNS Settings on Windows 11

If you use a wired ethernet connection, replace Wi-Fi with Ethernet in the above commands.

Expert tip:


Some PC issues are hard to tackle, especially when it comes to corrupted repositories or missing Windows files. If you are having troubles fixing an error, your system may be partially broken.
We recommend installing Restoro, a tool that will scan your machine and identify what the fault is.
Click here to download and start repairing.

We also recommend reading our guide to diagnose & fix the most common DNS issues hogging your Windows computer.

4. Use Windows PowerShell

  1. Press the Windows key, type powershell, and select Run as administrator from the right section.
  2. Type and copy-paste the following command and press the Enter key to find out the InterfaceIndex of your current network configuration. Get-NetAdapter | Select-Object InterfaceAlias , InterfaceIndexChange DNS Settings on Windows 11
  3. Now, type or copy-paste the following command and hit Enter to assign the Primary DNS server address. Replace N with InterfaceIndex of your current network: Set-DnsClientServerAddress -InterfaceIndex N -ServerAddresses DNS Settings on Windows 11
  4. If you also want to assign an Alternate DNS address, you need type the address after adding a comma: Set-DnsClientServerAddress -InterfaceIndex N -ServerAddresses, DNS Settings on Windows 11

The NetTCPIP module allows you to change the DNS server settings using Windows PowerShell on Windows 11.

So, these are all the possible ways to modify DNS settings on your Windows 11 system. 

You may also be looking for ways to resolve the can’t connect to this network error if it frequents your Windows PC. 

If you face any issues when changing the DNS settings, contact us in the comments section for guidance. 

Still having issues? Fix them with this tool:


If the advices above haven't solved your issue, your PC may experience deeper Windows problems. We recommend downloading this PC Repair tool (rated Great on to easily address them. After installation, simply click the Start Scan button and then press on Repair All.

This article covers:Topics: