When you connect to a network and the internet, the Domain Name System (DNS) address is essential to make accessing different websites and downloading files easier.
Usually, you don't have to worry about this configuration because it's already provided by your Internet Service Provider (ISP). The problem is that these services are slow, unreliable, and, more importantly, not private. However, it's possible to change this configuration to other services that provide more privacy and performance.
In a nutshell, a Domain Name System is usually a free service that provides the technology that allows you to type the website name in the browser to load the web page. If DNS didn't exist, it would be nearly impossible to navigate the web as we do today because you would need to use the site's IP address, which is difficult to remember.
The reason is that computers require numeric addresses (commonly known as IP addresses), such as 184.108.40.206, to communicate with other devices. However, these IPs are not easy for humans to remember, and DNS provides the means to translate friendly website names (for example, Microsoft.com) to the numeric address that computers understand when you type the domain name in the address bar of the browser.
You probably never noticed this translation because the process happens almost in real time. However, depending on the service you use, this could make your internet experience slower and unreliable.
If you prefer a different service or want to switch to a more private and reliable resolver, Windows 11 allows you to change the DNS settings in at least three ways using the Settings app, Control Panel, and Command Prompt.
Although it's best to configure the DNS settings on the router, sometimes, you may have reasons to change the network configuration on your computer manually. For instance, if you don't have access to the router, you must configure a server that needs static settings or for many other reasons.
This guide will walk you through the steps to change the DNS settings on Windows 11.
HOW TO CHANGE DNS FROM SETTINGS ON WINDOWS 11
To change the DNS settings on Windows 11, use these steps:
- Open Settings.
- Click on Network & internet.
- Click the Ethernet or Wi-Fi page on the right side.
(Image credit: Future)
- Quick note: If you select the Wi-Fi option, you must click the properties settings to access the networking configuration.
- Click the Edit button for the "DNS server assignment" setting.
- Select the Manual option from the drop-down menu.
- Turn on the IPv4 toggle switch.
- Confirm the primary DNS address in the "Preferred DNS" setting. For example, to use Cloudflare, Google Public DNS, or Cisco OpenDNS, use these settings:
- Cloudflare: 220.127.116.11
- Google Public DNS: 18.104.22.168
- OpenDNS: 22.214.171.124
- (Optional) Select the encryption option in the "Preferred DNS encryption" setting. Options available include:
- Unencrypted only — Encryption won't be for DNS queries.
- Encrypted only (DNS over HTTPS) — DNS queries will be sent encrypted using the HTTPS protocol.
- Encrypted preferred, unencrypted allowed — Encryption will be preferred to send DNS queries, but unencrypted queries will also be permitted.
- Quick note: DNS over HTTPS (DoH) is a network protocol that encrypts DNS queries using the standard Hypertext Transfer Protocol Secure (HTTPS) protocol to protect DNS queries, resulting in better security and privacy browsing the web. You will only be able to enable this feature if you have specified a DNS address that supports encryption.
- Confirm the secondary DNS address in the "Alternate DNS" setting. You can use one of the secondary addresses:
- Cloudflare: 126.96.36.199
- Google Public DNS: 188.8.131.52
- OpenDNS: 184.108.40.206
- (Optional) Select the encryption option in the "Alternative DNS encryption" setting.
- Click the Save button.
Once you complete the steps, the new settings should apply immediately. However, you may need to restart the computer for new DNS servers to start working.
HOW TO CHANGE DNS FROM COMMAND PROMPT ON WINDOWS 11
To change the Windows 11 DNS addresses with commands, use these steps:
- Open Start.
- Search for Command Prompt, right-click the top result, and select the Run as administrator option.
- Type the following command to run the netsh tool and press Enter: netsh
- Type the following command to identify the names of the network adapters and press Enter: interface show interface
- Type the following command to set the primary DNS address and press Enter: interface ip set dns name="ADAPTER-NAME" source="static" address="X.X.X.X"
In the command, change "ADAPTER-NAME" with the name of the network adapter you identified in step 4, and change "X.X.X.X" with the IP address you want to use. To use Cloudflare, Google Public DNS, or Cisco OpenDNS, you can use these settings:
- Cloudflare: 220.127.116.11 and 18.104.22.168
- Google Public DNS: 22.214.171.124 and 126.96.36.199
- OpenDNS: 188.8.131.52 and 184.108.40.206
This example sets the primary DNS address to 220.127.116.11: interface ip set dns name="Ethernet0" source="static" address="18.104.22.168"
- Type the following command to add an alternative DNS address and press Enter: interface ip add dns name="ADAPTER-NAME" addr="X.X.X.X" index=2
In the command, change "ADAPTER-NAME" with the name of your network adapter you queried on step 4, and change "X.X.X.X" with the secondary address. This example sets the secondary DNS address to 22.214.171.124: interface ip add dns name="Ethernet0" addr="126.96.36.199" index=2
- Quick tip: Repeat the above steps to set additional addresses (if necessary). However, in the command, you must increase the number of the index option by 1. For instance, interface ip add dns name="Ethernet1" addr="188.8.131.52" index=3
Once you complete the steps, the computer will start using the new addresses to perform DNS queries.