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
- Use the shortcut to go to the Settings app. WindowsI
- Select Network & Internet from the left sidebar, then select Wi-Fi or Ethernet from the right, depending to your internet connection.
- Scroll down and select Hardware Properties.
- Find the DNS Server Assignment setting and click the Edit button next to it.
- 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).
Next, enable the switch for - IPv4 or IPv6 depending on the IP connection type.
Now, provide the primary DNS server address in the - "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)
If you want to enable the DNS over HTTPS feature to encrypt DNS requests, set the Encryption" and "- Alternate DNS Encryption" drop-down lists select "Only Encrypted (HTTPS-based) DNS".
Press the - "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 - "Run" command window, type the following command and press "OK". This will open Network Connections directly in Control Panel. WindowsR
ncpa.cpl<strong></strong>
##right click Wi-Fi- or Ethernet connection, depending on your connection type, and select Properties from the context menu. This will open the "
Wi-Fi Properties- " window. Double-click Internet Protocol Version 4 (TCP/IPv4) located under the This connection uses the following items section. In the new pop-up window, enable the Use the following DNS server address option and provide the preferred DNS server and
Alternate- 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). Press the
"OK" - button to save the changes.
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
- key, type cmd in the search bar, and then select Run as administrator located in the right pane. Windows
- Click the is button on the User Access Control popup.
- 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>
- 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>
- 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>
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
- key, type powershell and select Run as administrator from the right section. Windows
- 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>
##Now type or copy paste the following command and click to assign - Primary DNSServer address. Replace N with the interface index of the current network: Enter
Set-DnsClientServerAddress -InterfaceIndex N -ServerAddresses 8.8.8.8<strong></strong>
If you also want to assign an - 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>
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!