DNS Resolvers

How to change DNS server address on Windows 11

You can always change the DNS servers on Windows 11 for faster, more private, and secure resolvers, and here's how.

Windows 11 change DNS servers

On Windows 11 (or any other computing system), Domain Name System (DNS) is a technology that translates domain names (Twitter.com) into IP addresses (104.244.42.193) that computers can understand.

Typically, your Internet Service Provider (ISP) supplies this configuration automatically to make it easier for you to connect to your favorite websites and services. However, many other DNS resolvers on the internet are faster, more reliable, better in privacy, and more secure. Some of them, include  Cloudflare, Google, and Cisco.

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

In this guide, you will learn how to change the DNS servers on Windows 11.

Best DNS servers for Windows 11

Cloudflare, OpenDNS, and Google are among the best companies that offer fast, reliable, and secure resolvers. However, you can always use any service you want.

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 11 using Command Prompt

The quickest way to change the DNS servers on Windows 11 is using Command Prompt, even though, typing commands isn’t for everyone.

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

  1. Open Start on Windows 11.

  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

    Current DNS servers

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

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

    In the command, change Ethernet1 with the name of your adapter and 1.1.1.1 with the DNS server address for the service you want to use. You can also specify the address for the local DNS server (if applicable).

  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 command, change Ethernet1 with the name of your adapter and 1.0.0.1 with the preferred alternate DNS server address.

    Command Prompt change DNS servers

Once you complete the steps, you can use the ipconfig /all command to confirm the new configuration.

Change DNS servers on Windows 11 using PowerShell

You can also use the NetTCPIP module with PowerShell to manage the DNS server settings on Windows 11.

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

    Get-NetIPConfiguration

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

    Set-DnsClientServerAddress -InterfaceIndex 12 -ServerAddresses 208.67.222.222

    Change DNS server with 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 12 -ServerAddresses 208.67.222.222, 208.67.220.220

    In the command, change the InterfaceIndex number with the one corresponding to your network adapter, and change ServerAddresses with the DNS address.

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

Change DNS servers on Windows 11 using Settings

If typing commands isn’t for you, the Settings app is the best method to change the DNS servers. You can even easily configure DNS over HTTPS (DoH), which offers more privacy and security using encryption for in and out DNS traffic from your computer.

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

  1. Open Settings.

  2. Click on Network & Internet.

  3. Click the Ethernet tab.

    Quick note:

  4. Under the “DNS server assignment” section, click the Edit button.

    DNS server assignment

  5. Select the Manual option using the drop-down menu.

  6. Turn on the IPv4 toggle switch.

  7. Under the “Preferred DNS” section, specify the IP address of the DNS server for Cloudflare, Google, OpenDNS, or another service.

    Change DNS server with encryption

  8. (Optional) Under the “Preferred DNS encryption” section, select the Encrypted only (DNS over HTTPS) option to enable DNS encryption.

    Quick note: The option to enable encryption will only be available if the service is detected by Windows 11 to support the technology.
  9. Under the “Alternate DNS” section, specify the IP address of the secondary DNS address.

  10. (Optional) Under the “Alternative DNS encryption” section, select the Encrypted only (DNS over HTTPS) option to enable encryption for the secondary server.

  11. Click the Save button.

Once you complete the steps, the computer will continue to use a dynamic network address configuration, but it’ll now use the static DNS servers you specified.

Change DNS servers on Windows 11 using Control Panel

Alternatively, it’s still possible to use Control Panel to change the DNS settings on Windows 11.

To change the DNS address of Windows 11 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

  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 network properties

  8. Under the “Use the following DNS server addresses” section, specify the Preferred DNS server, which is the server address of Cloudflare, Google, OpenDNS, or another service.

    Control Panel change DNS server

  9. (Optional) Specify 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 use services like dnsleaktest to confirm the new configuration. 

When using Control Panel, you can specify any DNS server on Windows 11, but you won’t be able to enable DNS over HTTPS.

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