Home  >  Article  >  How to change DNS settings on Windows 11

How to change DNS settings on Windows 11

王林
王林forward
2023-05-01 18:58:0427146browse

Your ISP is configured to provide a default Domain Name System (DNS) when setting up your Internet connection. This poses various security threats and slows down the internet, so DNS servers must be assigned manually.

Browse this detailed guide to learn how to change DNS settings on your Windows 11 computer and protect your online presence.

How to change DNS settings on Windows 11?

1. Use the Settings app

  1. Use the shortcut to go to the Settings app. WindowsI
  2. Select Network & Internet from the left sidebar, then select Wi-Fi or Ethernet from the right, depending to your internet connection. 如何在 Windows 11 上更改 DNS 设置
  3. Scroll down and select Hardware Properties. 如何在 Windows 11 上更改 DNS 设置
  4. Find the DNS Server Assignment setting and click the Edit button next to it. 如何在 Windows 11 上更改 DNS 设置
  5. This will open the "Edit DNS Settings" pop-up window. Here, expand the drop-down menu at the top and select Manual instead of Automatic (DHCP).
  6. Next, enable the switch for
  7. IPv4 or IPv6 depending on the IP connection type. 如何在 Windows 11 上更改 DNS 设置
  8. Now, provide the primary DNS server address in the
  9. "Preferred DNS" field and then provide the secondary DNS server address in the "Alternate DNS" field. (For example, 8.8.8.8 is the preferred DNS address and 8.8.4.4 is the alternative DNS address for the Google DNS servers) 如何在 Windows 11 上更改 DNS 设置
  10. If you want to enable the DNS over HTTPS feature to encrypt DNS requests, set the Encryption" and "
  11. Alternate DNS Encryption" drop-down lists select "Only Encrypted (HTTPS-based) DNS". 如何在 Windows 11 上更改 DNS 设置
  12. Press the
  13. "Save" button after completing the changes.
You can easily change DNS settings on Windows 11 through the Settings app to browse faster and avoid security issues. Enabling encryption and defining DNS using IPv4 and IPv6 protocols ensures more secure network communications.

Note Before changing the DNS settings on your Windows 11 computer, make sure that your ISP supports manual DNS servers and is not configured by default to use only your ISP's DNS servers.

2. Use the Control Panel

    Use the shortcut to launch the
  1. "Run" command window, type the following command and press "OK". This will open Network Connections directly in Control Panel. WindowsRncpa.cpl<strong></strong>如何在 Windows 11 上更改 DNS 设置##right click
  2. Wi-Fi
  3. or Ethernet connection, depending on your connection type, and select Properties from the context menu. 如何在 Windows 11 上更改 DNS 设置This will open the "
  4. Wi-Fi Properties
  5. " window. Double-click Internet Protocol Version 4 (TCP/IPv4) located under the This connection uses the following items section. 如何在 Windows 11 上更改 DNS 设置In the new pop-up window, enable the Use the following DNS server address option and provide the preferred DNS server and
  6. Alternate
  7. DNS server address in their respective fields . (For example, to use Cloudflare DNS servers, assign 1.1.1.1 as the preferred DNS and 1.0.0.1 as the backup DNS). 如何在 Windows 11 上更改 DNS 设置Press the
  8. "OK"
  9. button to save the changes.
  10. Many of our readers prefer Control Panel to change their Windows 11 PC’s DNS settings. Although this is one of the oldest methods of configuring DNS settings, it does not allow you to enable DNS encryption for your server.

3. Use the Command Prompt

  1. key, type cmd in the search bar, and then select Run as administrator located in the right pane. Windows如何在 Windows 11 上更改 DNS 设置
  2. Click the is button on the User Access Control popup.
  3. In the Command Prompt window, type or copy-paste the following command, and then press the key. Replace Preferred DNS with the primary DNS address of your preferred server. Enter<strong>netsh interface ipv4 set dnsservers Wi-Fi Static Preferred DNS primary</strong>如何在 Windows 11 上更改 DNS 设置
  4. Next, type or copy-paste the following command to Assign alternate DNS server and press key. Replace the secondary DNS with the secondary DNS server address. Enter<strong>netsh interface ipv4 add dnsservers Wi-Fi Alternate DNS index=2</strong>如何在 Windows 11 上更改 DNS 设置
  5. If you wantwill be done manually DNS To reset settings to automatic (DHCP), please type the following command and press the key. Enter<strong>netsh interface ip set dns "Local Area Connection" dhcp</strong>如何在 Windows 11 上更改 DNS 设置

If you are using a wired Ethernet connection, Please replace Wi-Fi with Ethernet in the above command.

Expert Tip:

Some PC problems are difficult to solve, especially when they involve corrupted repositories or missing Windows files. If you are having trouble fixing errors, your system may be partially corrupted.
We recommend installing Restoro, a tool that will scan your machine and determine what the fault is.
Click here to download and start repairing.

We also recommend reading our guide to diagnosing and fixing the most common DNS problems tying up your Windows computer.

4. Using the Windows PowerShell

  1. key, type powershell and select Run as administrator from the right section. Windows
  2. Type and copy-paste the following command, then press the keys to find out the Interface Index of the current network configuration. Enter<strong>Get-NetAdapter | Select-Object InterfaceAlias ​​, InterfaceIndex</strong>如何在 Windows 11 上更改 DNS 设置
  3. ##Now type or copy paste the following command and click to assign
  4. Primary DNSServer address. Replace N with the interface index of the current network: EnterSet-DnsClientServerAddress -InterfaceIndex N -ServerAddresses 8.8.8.8<strong></strong>如何在 Windows 11 上更改 DNS 设置
  5. If you also want to assign an
  6. alternate DNS address, you need to type the address after adding a comma: Set-DnsClientServerAddress -InterfaceIndex N -ServerAddresses 8.8.8.8, 8.8.4.4<strong></strong>如何在 Windows 11 上更改 DNS 设置
The NetTCPIP module allows you to change DNS server settings on Windows 11 using Windows PowerShell.

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

You might also be looking for ways to fix the Cannot connect to this network error if it frequents your Windows PC.

The above is the detailed content of How to change DNS settings on Windows 11. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:yundongfang.com. If there is any infringement, please contact admin@php.cn delete