How to change DNS to Google, Cloudflare, or OpenDNS on Windows 10

If you need to change your device's DNS addresses, in this guide, you'll learn three ways to perform this task on Windows 10.

Windows 10 change DNS address
Windows 10 change DNS address

Domain Name System (DNS) is a service that translates familiar domain names (Google.com) into IP addresses (172.217.6.238) which aren’t easy to remember. You don’t usually have to worry about adjusting the DNS configuration because your Internet Service Provider (ISP) provides this service automatically. However, you will find many other DNS resolvers on the internet that are faster, reliable, private, and more secure, including those provided by Cloudflare, Google, and Cisco.

If the DNS servers offered by your ISP are slow and not reliable or don’t trust their resolvers, you can change the DNS addresses on Windows 10 in at least four different ways using Command Prompt, PowerShell, Settings, and Control Panel.

In this guide, you’ll learn how to change the DNS addresses to use a more reliable and secure resolution service on your Windows 10 device.

Best DNS servers for Windows 10

Although there are many resolver services out there, Cloudflare, Google, and OpenDNS are among the companies that offer fast, reliable, and secure resolvers.

Cloudflare DNS addresses

  • 1.1.1.1
  • 1.0.0.1

Google Public DNS addresses

  • 8.8.8.8
  • 8.8.4.4

OpenDNS by Cisco DNS addresses

  • 208.67.222.222
  • 208.67.220.220

Change DNS servers on Windows 10 using Command Prompt

Although using command lines is not a suitable method for most users, it’s one of the quickest ways to change the DNS address on Windows 10.

To change the DNS address with Command Prompt, use these steps:

  1. Open Start on Windows 10.

  2. Search for Command Prompt, right-click the top result, and select the Run as administrator option.

  3. Type the following command to see your current networking configuration and press Enter:

    ipconfig /all
  4. Under the network adapter section, confirm the adapter’s name and these fields:

    • IPv4
    • DNS Servers

    ipconfig view DNS info

  5. Type the following command to set the new DNS server address and press Enter:

    netsh interface ip set dns name="Ethernet1" static 1.1.1.1

    In the above command, make sure to change Ethernet1 with the name of your adapter and 1.1.1.1 with the DNS server address that you want to use.

  6. Type the following command to set an alternate DNS server address and press Enter:

    netsh interface ip add dns name="Ethernet1" 1.0.0.1 index=2

    In the above command, make sure to change Ethernet1 with the name of your adapter and 1.0.0.1 with the preferred alternate DNS server address.

    Change DNS IP on Windows 10

Once you complete the steps, you can confirm the new configuration using the ipconfig /all command and checking the DNS Servers’ addresses.

Microsoft is in the process of retiring netsh on Windows 10. It would be best to start using the NetTCPIP networking module available in PowerShell instead.

Change DNS servers on Windows 10 using PowerShell

Windows 10 also includes PowerShell, a command-line platform that allows you to use the NetTCPIP module to manage networking settings, including the ability to change the DNS address settings of your device.

To change the DNS address with PowerShell, use these steps:

  1. Open Start.

  2. Search for PowerShell, right-click the result, and select the Run as administrator option.

  3. Type the following command to view your current network configuration and press Enter:

    Get-NetIPConfiguration

    After running the command, note the following information: 

    • InterfaceIndex
    • DNSServer

    PowerShell view network configuration

  4. Type the following command to assign a primary DNS server address and press Enter:

    Set-DnsClientServerAddress -InterfaceIndex 11 -ServerAddresses 208.67.222.222

    Change primary DNS address

    (Optional) If you need to set a secondary DNS server address, you can use the same command, but adding a comma and appending the second address:

    Set-DnsClientServerAddress -InterfaceIndex 11 -ServerAddresses 208.67.222.222, 208.67.220.220

    Change primary and secondary DNS addresses

    In the above command, make sure to change the InterfaceIndex number with the one corresponding to your adapter, and change ServerAddresses with the DNS IP address.

After you complete the steps, you can test the new configuration using this guide.

Change DNS servers on Windows 10 using Settings

You can also specify new DNS addresses using the Settings app, but you need to configure all the TCP/IP settings to static to make it work. If you’re not comfortable assigning a static TCP/IP configuration, you should not use this option. 

To change the Windows 10 DNS address with Settings, use these steps:

  1. Open Settings.

  2. Click on Network & Internet.

  3. Click on Status.

  4. Under the “Network status” section, click the Properties button for the network you want to modify.

  5. Under the “IP settings” section, click the Edit button.

    IP settings edit option

  6. Use the drop-down menu and select the Manual option.

  7. Turn on the IPv4 toggle switch.

  8. Under the “IP address” section, specify the TCP/IP address for the computer.

  9. Under the “Subnet prefix length” section, set the subnet length. Usually, for home networks, the address length is 24 to represent the subnet address 255.255.255.0.

  10. Under the “Gateway” section, set the default gateway address. Usually, this is the IP address of the router.

  11. Under the “Preferred DNS” section, specify the IP address of the DNS server (for example, 1.1.1.1).

    Network settings change DNS

  12. Under the “Alternate DNS” section, specify the IP address of the secondary DNS address.

  13. Click the Save button.

Once you complete the steps, the device will continue to receive its TCP/IP address from the DHCP server, but it’ll now use the specified DNS addresses.

Change DNS servers on Windows 10 using Control Panel

Alternatively, you can also use Control Panel to change the DNS settings on Windows 10.

To change the DNS address of Windows 10 with Control Panel, use these steps:

  1. Open Control Panel.

  2. Click on Network and Internet.

  3. Click on Network and Sharing Center.

  4. Click the Change adapter settings option from the left pane.

    Change adapter settings on Windows 10

  5. Right-click the network adapter and select the Properties option.

  6. Select the Internet Protocol Version 4 (TCP/IPv4) option.

  7. Click the Properties button.

    Control Panel change IPv4 settintgs

  8. Under the “Use the following DNS server addresses” section, set Preferred DNS server, which is the server’s IP address providing DNS resolutions (for example, 8.8.8.8).

    Windows 10 change DNS IP in Control Panel

  9. (Optional) Set the Alternative DNS server, the DNS address that your device will use if it can’t reach the preferred server address.

  10. Click the OK button.

  11. Click the Close button.

Once you complete the steps, you can open your web browser and try loading a website to see if the new configuration works.

Whatever method you use, make sure the IP address for the DNS server is correct to allow proper resolution. Otherwise, you won’t be able to connect to the internet.

Although we’re focusing this guide on Windows 10, you can use the Command Prompt and Control Panel methods on Windows 8.1 and Windows 7.

About the author

Mauro Huculak is a Windows How-To Expert who started Pureinfotech in 2010 as an independent online publication. He has also been a Windows Central contributor for nearly a decade. Mauro has over 15 years of experience writing comprehensive guides and creating professional videos about Windows and software, including Android and Linux. Before becoming a technology writer, he was an IT administrator for seven years. In total, Mauro has over 21 years of combined experience in technology. Throughout his career, he achieved different professional certifications from Microsoft (MSCA), Cisco (CCNP), VMware (VCP), and CompTIA (A+ and Network+), and he has been recognized as a Microsoft MVP for many years. You can follow him on X (Twitter), YouTube, LinkedIn and About.me. Email him at [email protected].