How to Change DNS Settings on Windows 11
Changing the DNS on Windows 11 can fix the Internet connection
- 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.
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
- Head over to the Settings app using the Windows + I shortcut.
- Select Network & internet from the left sidebar and choose Wi-Fi or Ethernet from the right section, depending on your internet connection.
- Scroll down and select Hardware properties.
- Locate the DNS server assignment setting and click the Edit button next to it.
- This will open the Edit DNS settings popup. Here, expand the drop-down on the top and choose Manual instead of Automatic (DHCP).
- Next, enable the toggle for either IPv4 or IPv6, based on the IP connection type.
- 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, 126.96.36.199 is the preferred DNS address, and 188.8.131.52 alternative DNS address for Google’s DNS server)
- 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.
- 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.
2. Use Control Panel
- 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.
- Right-click the Wi-Fi or Ethernet connection, depending on your connection type, and choose Properties from the context menu.
- 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.
- 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 184.108.40.206 as Preferred DNS and 220.127.116.11 as Alternative DNS).
- 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
- Press the Windows key, type cmd in the search bar, and choose Run as administrator, located on the right pane.
- Click the Yes button on the User Access Control popup.
- 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 primary
- 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=2
- 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" dhcp
If you use a wired ethernet connection, replace Wi-Fi with Ethernet in the above commands.
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
- Press the Windows key, type powershell, and select Run as administrator from the right section.
- 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 , InterfaceIndex
- 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 18.104.22.168
- If you also want to assign an Alternate DNS address, you need type the address after adding a comma:
Set-DnsClientServerAddress -InterfaceIndex N -ServerAddresses 22.214.171.124, 126.96.36.199
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 TrustPilot.com) to easily address them. After installation, simply click the Start Scan button and then press on Repair All.