Windows 10 change DNS address
Best DNS servers

How to change DNS address to faster resolvers on Windows 10

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

Domain Name System (DNS) is a service that translate friendly domain names (Google.com) into IP addresses (172.217.6.238) which aren’t friendly to remember. Typically, you don’t have to worry about adjusting your DNS configuration, because your Internet Service Provider (ISP) always provides this service automatically. However, there are many other the DNS resolvers 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 you simply don’t trust their resolvers, you can change the DNS addresses on Windows 10 in at least four different ways using Command Prompt, PowerShell, and Control Panel.

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

List of fast and reliable free DNS services

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

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

How to change DNS address using Command Prompt

Although using command lines is the most suited method for most regular users, it’s one of the quickest way to change the DNS address on Windows 10.

  1. Open Start.

  2. Search for Command Prompt, right-click the result and select Run as administrator to open the console.

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

    ipconfig /all
  4. Under the network adapter note the name of the network adapter as well as the following information in these fields:

    • IPv4
    • DNS Servers

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

    netsh interface ip set dns name="Ethernet0" static 1.1.1.1
    Change primary DNS IP address on Windows 10
    Change primary DNS IP address on Windows 10

    In the above command make sure to change Ethernet0 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="Ethernet0" 1.0.0.1 index=2

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

    Adding second DNS IP address on Windows 10
    Adding second DNS IP address on Windows 10

After completing 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, as such you should start using the NetTCPIP networking module available in PowerShell instead.

How to change DNS address using PowerShell

Windows 10 also includes PowerShell 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.

  1. Open Start.

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

  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

    Get network IP configuration using PowerShell
    Get network IP configuration using PowerShell
  4. Type the following command to assign a primary DNS server address and press Enter:

    Set-DnsClientServerAddress -InterfaceIndex 10 -ServerAddresses 208.67.222.222
    Change DNS IP address using PowerShell
    Change DNS IP address using PowerShell

    (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 10 -ServerAddresses 208.67.222.222, 208.67.220.220
    Set primary and alternative DNS addresses using PowerShell
    Set primary and alternative DNS addresses using PowerShell

    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 completing the steps, you can test the new configuration using this guide.

How to change DNS address using Control Panel

If Command Prompt isn’t for you, it’s still possible to use Control Panel to change the DNS settings on Windows 10 using these steps:

  1. Open Control Panel.

  2. Click on Network and Internet.

  3. Click on Network and Sharing Center.

  4. On the left pane, click the Change adapter settings link.

    Control Panel's Network and Sharing Center
    Control Panel’s Network and Sharing Center
  5. Right-click the network adapter and select Properties.

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

  7. Click the Properties button.

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

    Change DNS server addresses using Control Panel
    Change DNS server addresses using Control Panel
  9. (Optional) Set the Alternative DNS server, which is 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’ve completed the steps, you can open your web browser and try loading a website to see if the configuration works.

Whatever the 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.

If you need more help assigning a DNS address on Windows 10, make sure to ask in the Pureinfotech forums. If you’re looking to assign static IP address to the entire networking stack, then use this guide.

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.