Using dynamic IP addresses and a dedicated DNS server is an excellent way to enhance privacy for your computer. However, for various reasons, some users cannot change DNS server on Windows 10. This article provides solutions for affected users to apply and resolve the issue.
Troubleshooting DNS Unchangeable Error on Computer
Fixing the Issue of Unchangeable DNS Server on Win 10
Tips: To understand what DNS is, you can follow the article here.
- Explore more: What is DNS?
1. Try changing DNS using a different method
If the DNS servers provided by your ISP are slow and unreliable, or you simply don't trust their resolution system (DNS resolvers), you can quickly change DNS addresses on Windows 10 using at least four different methods: Command Prompt, PowerShell, Settings, and Control Panel.
1.1. Change DNS using Control Panel
To change DNS on Windows 10 using Control Panel, follow these steps:
Step 1: Enter the keyword Control Panel in the search box on the Taskbar. From the search results, click to open the Control Panel window.
Step 2: Here, click on Network and Sharing Center > Change adapter settings to open the panel on the left side of the window.
Step 3: Right-click on Ethernet or Wi-Fi and select Properties.
Step 4: In the Ethernet Properties window, double-click on the option Internet Protocol Version 4 (TCP/IPv4).
Step 5: Check the option Use the following DNS server addresses and enter the chosen DNS into Preferred DNS server and Alternate DNS server.
Here are some DNS options for your reference:
* Google DNS:
- Preferred DNS server: 8.8.8.8
- Alternate DNS server: 8.8.4.4
* CloudFlare DNS:
- Preferred DNS server: 1.1.1.1
- Alternate DNS server: 1.0.0.1
- Preferred DNS server: 208.67.222.222
- Alternate DNS server: 208.67.220.220
Step 6: Click OK to save the changes.
1.2. Change DNS using Command Prompt
If you cannot change DNS through Control Panel, you can change DNS using Command Prompt with the following steps:
Step 1: Enter the keyword 'cmd' into the search box on the Taskbar.
Step 2: Right-click on Command Prompt from the search results and choose Run as administrator.
Step 3: Enter the command ipconfig /all to view your current network configuration and press Enter.
Step 4: Note the name of the Network Adapter.
Step 5: Enter the following command to set the new DNS and press Enter:
netsh interface ip set dns name='Ethernet0' static 1.1.1.1
Note: In the above command, replace Ethernet0 with your Adapter's name and 1.1.1.1 with the DNS server you want to use.
Step 6: Enter the following command to set the Alternate DNS Server and press Enter:
netsh interface ip add dns name='Ethernet0' 1.0.0.1 index=2
Note: In the above command, replace Ethernet0 with your Adapter's name and 1.0.0.1 with the Alternate DNS Server corresponding to the Preferred DNS server.
After completing the above steps, you can confirm the new configuration by entering the command ipconfig /all and checking the DNS Server addresses.
1.3. Change DNS Using PowerShell
Windows 10 also includes PowerShell, allowing you to use the NetTCPIP module to manage network settings, including changing the DNS settings of your computer. Follow the instructions below to change the DNS address using PowerShell:
Step 1: Enter the keyword 'powershell' into the search box on the Taskbar.
Step 2: Right-click on PowerShell from the search results and select Run as administrator.
Step 3: Enter the command below to view your current network configuration and press Enter.
InterfaceIndex
DNSServer
Step 4: Next, enter the command below to assign the Primary DNS server and press Enter:
Set-DnsClientServerAddress -InterfaceIndex 10 -ServerAddresses 208.67.222.222
Step 5: Enter the command below to assign the Alternate DNS server and press Enter:
Set-DnsClientServerAddress -InterfaceIndex 10 -ServerAddresses 208.67.222.222, 208.67.220.220
Note: In the above commands, make sure to change the InterfaceIndex with the number corresponding to your Adapter, and modify ServerAddresses with the DNS addresses you want to use.
1.4. Changing DNS through Settings
You can also specify new DNS addresses using the Settings app, but you need to configure all TCP/IP settings to static for it to work. Here are the steps:
Step 1: Enter the keyword 'settings' into the search box on the Taskbar and click on Settings to open the settings window.
Step 2: Click on Network & Internet > Status.
Step 3: Under the Network status section, click the Properties button of the network you want to modify.
Step 4: Under the IP settings section, click the Edit button.
Step 5: In the Edit IP settings menu, select Manual and enable IPv4.
Step 6: Under the IP address section, specify the TCP/IP address for the device.
Step 7: Under the Subnet prefix length section, set the number of network bits in an IP address. Typically, a home network has a Subnet prefix length of 24 to represent the subnet address 255.255.255.0.
Step 8: Under the Gateway section, set the default Gateway address. Usually, this is the IP address of the router.
Step 9: Under the Preferred DNS section, enter the IP address of the primary DNS server, such as 8.8.8.8.
Step 10: Under the Alternate DNS section, enter the IP address of the secondary DNS server, such as 1.1.1.1.
Step 11: Click Save to apply the changes.
After completing these steps, your computer will continue to receive TCP/IP addresses from the DHCP server, but it will use the DNS addresses you specified.
2. Clear DNS cache and reset Winsock
Follow the instructions below to clear the DNS cache and reset Winsock:
Step 1: Enter 'cmd' into the search bar on the Taskbar.
Step 2: Right-click on Command Prompt from the search results and choose Run as administrator.
Step 3: Copy and paste the following commands: (Note: Press Enter between each command).
ipconfig /flushdns
ipconfig /registerdns
NETSH winsock reset catalog
NETSH int ipv4 reset reset.log
NETSH int ipv6 reset reset.log
exit
Step 4: Restart your computer to save the changes. Then, proceed to change DNS using one of the 4 methods shared above and check if the issue has been resolved.
If you are unable to change the DNS server on Windows 10, use the commands above to clear DNS servers and reset Winsock, taking responsibility for your TCP/IP configuration.
Additionally, if you are using an Android or iPhone or have recently upgraded to Windows 11 and are unsure how to change DNS on Windows 11, you can refer to the article below for step-by-step instructions.
- Read more: How to change DNS on iPhone
- Read more: How to change DNS on Android phones
- Explore more: How to change DNS on Windows 11