How to change DNS server address on Windows 11

Change your DNS settings on Windows 11 to use a different resolver for better reliability, privacy, or control.

Windows 11 change DNS servers / Image: Mauro Huculak
Windows 11 change DNS servers / Image: Mauro Huculak
  • Windows 11 lets you change DNS servers through Settings, Command Prompt, PowerShell, or Control Panel.
  • Cloudflare, Google, and OpenDNS are among the DNS resolvers covered in the guide.
  • Settings is the easiest method and also supports DNS over HTTPS for encrypted DNS traffic.
  • You can restore automatic DNS through DHCP if you no longer want to use custom servers.

On Windows 11 (like on any other computing system), Domain Name System (DNS) is a core technology of the internet and networks across the planet that translates domain names (X.com) into IP addresses (104.244.42.193) that computers can understand. Otherwise, it would be too difficult for us to remember a bunch of numbers for each website we want to visit or the device we have to connect to.

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

If the current DNS servers are slow and unreliable and you want to boost your internet experience, or you have privacy concerns about your ISP, you can change the DNS addresses on Windows 11 in at least four ways using the Settings app, Command Prompt, PowerShell, and Control Panel.

In this guide, I’ll teach you how to change the DNS servers on Windows 11. You can follow these instructions if you want to set a new DNS server address along with a static IP configuration.

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

I have been using Google DNS addresses for a long time, and they have been fast and reliable. To ensure the best experience, you can set the primary DNS address for one service and the primary address for another. If one service is down, you will still have connectivity through the secondary address.

Change DNS servers on Windows 11 from Settings

If typing commands isn’t your thing, the Settings app is the best way to change DNS servers. You can also easily configure DNS over HTTPS (DoH), which offers more privacy and security by encrypting your computer’s inbound and outbound DNS traffic.

To change the Windows 11 DNS address from Settings, follow these steps:

  1. Open Settings on Windows 11.

  2. Click on Network & Internet.

  3. Click the Ethernet page.

    Quick note: If you have a Wi-Fi connection, click the connection properties option to access the DNS settings.
  4. Click the Edit button under the “DNS server assignment” section.

    DNS server assignment

  5. Select Manual from the drop-down menu.

  6. Turn on the IPv4 toggle switch.

  7. Confirm the DNS server IP address for Cloudflare, Google, OpenDNS, or another service under the “Preferred DNS” section.

    Change DNS server with encryption

  8. (Optional) Select the “On (automatic template)” option to enable DNS encryption under the “Preferred DNS encryption” section.

    Quick note: The option to enable encryption will only be available if the service is detected by Windows 11 to support the technology. Use the “manual template” option if you’re connecting to a custom server or a privacy service that provides a unique endpoint URL.

  9. (Optional) Turn on the “Fallback to plaintext” toggle switch to send DNS requests unencrypted over plaintext if DoH fails.

  10. Confirm the IP address of the secondary DNS server under the “Alternate DNS” section.

  11. (Optional) Select the “On (automatic template)” option to enable encryption for the secondary server under the “Alternative DNS encryption” section.

  12. (Optional) Turn on the “Fallback to plaintext” toggle switch.

  13. 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.

Get the Pureinfotech newsletter

Expert Windows guides, practical tips, and the latest updates that make your PC easier to use, delivered to your inbox

If you want to undo the changes, you can use the same steps outlined above, but in step 5, choose the “Automatic” option and click the “Save” button.

Change DNS servers on Windows 11 from 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, follow these steps:

  1. Open Start.

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

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

    ipconfig /all
  4. Under the network adapter section, confirm the adapter’s name and the “IPv4” and “DNS Servers” addresses.

    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 “Ethernet0” to your adapter name and “1.1.1.1” to the DNS server address you want the service to use. You can also specify the local DNS server address (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 “Ethernet0” to the name of your adapter and “1.0.0.1” to 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.

If you no longer have to use the custom addresses, you can remove the configuration to receive dynamic DNS IP addresses from the DHCP server by running the netsh interface IP set DNS "ADAPTER-NAME" DHCP command. In the command, change the “ADAPTER-NAME” to the name of your network adapter.

Change DNS servers on Windows 11 from PowerShell

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

To change the DNS address from PowerShell on Windows 11, follow 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

    Confirm the values for the “InterfaceIndex” and “DNSServer” in the command output.

    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 add a comma and append the second address:

    Set-DnsClientServerAddress -InterfaceIndex 12 -ServerAddresses 208.67.222.222, 208.67.220.220

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

After you complete the steps, use these instructions to check whether network traffic is using the DNS resolver you configured.

If you no longer have to use the custom addresses, you can restore the IP addresses from the DHCP server by running the Get-NetAdapter "ADAPTER-NAME" | Set-DnsClientServerAddress -ResetServerAddresses command. In the command, change the “ADAPTER-NAME” to the name of your network adapter.

Change DNS servers on Windows 11 from Control Panel

Alternatively, you can still use Control Panel to change DNS settings on Windows 11.

To change the DNS address in Windows 11 from the legacy Control Panel, follow 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. Select “Use the following DNS server addresses” to enable manual DNS configuration.

  9. Confirm the “Preferred DNS server,” which is the server address of Cloudflare, Google, OpenDNS, or another service.

    Control Panel change DNS server

  10. (Optional) Specify the “Alternative DNS server” and the DNS address your device will use if it can’t reach the preferred server address.

  11. Click the OK button.

  12. Click the Close button.

Once you complete the steps, you can confirm the new configuration using services like the DNS leak test.

You can always restore the DHCP configuration for the DNS addresses using the same steps, but in step 8, choose the “Obtain DNS server address automatically” option and click the “OK” button. 

You can specify any DNS server on Windows 11 using the Control Panel, but you won’t be able to turn on the “DNS over HTTPS” feature. You can only do this from the Settings app. You can enable DoH through Command Prompt, but it’s not a supported option.

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. Also, it shouldn’t be necessary, but I have found in the past that a restart may be needed for the system to apply the settings.

You can change the DNS server addresses on Windows 11. However, the best approach is to configure the DHCP server (usually the router) to deploy these addresses to all local network computers automatically. Only proceed with this configuration on your computer if you don’t control the network or have a specific requirement to use a different address.

Pureinfotech’s Take

I’ve changed DNS servers on many computers over the years, and I still think this is one of those tweaks that makes sense when you have a reason. If your ISP’s DNS service is unreliable or you want to use a resolver you trust, Windows 11 gives you plenty of ways to make the change.

For most people, though, I wouldn’t change DNS just because someone says it will make their internet dramatically faster. DNS can affect how quickly a website starts connecting, but it won’t magically improve your connection speed. I’d also favor making the change at the router when possible, since that avoids configuring every computer individually.

If I were changing it on a single device, I’d use the Settings app. It’s simpler, and it also lets you configure DNS over HTTPS.

What DNS server do you use on Windows 11, and have you noticed a difference? Let me know in the comments.

Thank you for your feedback!
About the author

Mauro Huculak is a Windows How-To Expert and founder of Pureinfotech in 2010. With over 23 years as a technology writer and IT Specialist, Mauro specializes in Windows, software, and cross-platform systems such as Linux, Android, and macOS.

Certifications: Microsoft Certified Solutions Associate (MCSA), Cisco Certified Network Professional (CCNP), VMware Certified Professional (VCP), and CompTIA A+ and Network+.

Mauro is a recognized Microsoft MVP and has also been a long-time contributor to Windows Central.

You can follow him on YouTube, Threads, BlueSky, X (Twitter), LinkedIn and About.me. Email him at [email protected].

Comments

Join In