How to change the DNS server in Windows 11
If on your computer or windows 11 laptop individual sites not opening despite not being blocked, you see error messages ERR_NAME_NOT_RESOLVED, DNS_PROBE_FINISHED_NXDOMAIN and the like, sometimes changing the DNS server in your connection settings can help.
There are several ways to change DNS servers in Windows 11: using the new Settings interface, as well as in the classic connection properties or, if necessary, in the command line. You can also enable DNS over HTTPS in Windows 11.
Change DNS server in Windows 11 Preferences
The standard method of changing DNS server addresses in Windows 11 is to use Settings. The steps will be the following:
- Open “Settings” via Start menu or Win+I shortcut.
- Go to “Network and Internet” and click on the type of connection for which the DNS server will be changed: Ethernet or Wi-Fi (if available).
- If Wi-Fi network has been selected, go to “Hardware Properties”. For the Ethernet connection there will not be this step.
- Press the “Change” button under “DNS Server Mapping”.
- Select “Manual” instead of “Automatic (DH)”.
- Enable the connection types (IPv4 and/or IPv6) for which you want to configure your DNS server addresses.
- Specify your preferred DNS server and alternate DNS server addresses.
- Save the settings made.
In case you need to enable DNS encryption, use the instructions to enable DNS over HTTPS mentioned at the beginning of this article.
Normally the changes you make will take effect immediately, but you can clear the DNS cache by running the command line as an and using the command ipconfig / flushdns
Changing DNS servers in connection properties
The next method to manually configure DNS servers in Windows 11 is to use the old connection properties interface:
- Right-click the Start button and select Run (or press Win+R), type na.l and press Enter.
- In the list of connections that opens, right-click the connection whose DNS servers you want to change and select Properties.
- In the list of connection components, select "IP Version 4 (T/IPv4)" or "IP Version 6 (T/IPv6)" and click "Properties".
- Select “Use the following DNS server addresses”, specify the preferred and alternate DNS servers, and apply the settings.
As in the previous case, it can be useful to flush the DNS cache using the ipconfig /flushdns command at the command line.
How to change the DNS server on the command line
One more way: change the DNS server addresses on the command line. The necessary steps are:
- Run the command line as an .
- Enter the command
netsh interface show interface
- As a result of the command you will see a list of connections, write down the interface name of the connection whose DNS servers need to be changed, use it in the next command.
- To set the preferred DNS server for the connection, use the command
netsh interface ip set dns name="Имя_интерфейса" source="static" address="адрес_DNS-SERVERа"
- To set an alternate DNS server, the command is as follows
netsh interface ip add dns name="Имя_интерфейса" address="адрес_DNS-SERVERа" index=2
- Complete the setup by clearing the DNS cache using the command ipconfig / flushdns
This completes the configuration of the DNS server.
Public DNS server addresses
Below are some popular DNS server addresses for IPv4 and IPv6, preferred and alternate respectively:
- Google – 8.8.8.8 and 8.8.4.4; 2001:4860:4860::8888 and 2001:4860:4860::8844
- Cloudflare – 1.1.1.1 and 1.0.0.1; 2606:4700:4700::1111 and 2606:4700:4700::1001
- Yandex – 77.88.8.8 y 77.88.8.1; 2a02:6b8::feed:0ff y 2a02:6b8:0:1::feed:0ff
- OpenDNS – 208.67.222.222 and 208.67.220.220; 2620:119:35::35 and 2620:119:53::53