How to Change DNS in Windows 11 (Settings, Control Panel and Commands)

To change DNS in Windows 11 you only need the server addresses and about a minute in Settings. A different DNS provider can fix lookup errors, add malware filtering, or enable encrypted DNS. This guide covers four methods, lists the main public DNS servers, and shows how to undo the change.

Why Change Your DNS Server

By default Windows uses the DNS servers your router or internet provider hands out. Those are usually fine, but switching can help in a few specific cases.

Common reasons

People switch DNS to fix slow or failing lookups, to use a filtering service that blocks known malware domains, to use DNS over HTTPS so lookups are encrypted, or simply to rule out the provider’s DNS while troubleshooting. Do not expect faster downloads: DNS affects how quickly a name is looked up, not your bandwidth.

Popular public DNS servers

Provider IPv4 preferred / alternate IPv6 preferred / alternate
Cloudflare 1.1.1.1 / 1.0.0.1 2606:4700:4700::1111 / 2606:4700:4700::1001
Google Public DNS 8.8.8.8 / 8.8.4.4 2001:4860:4860::8888 / 2001:4860:4860::8844
Quad9 (malware blocking) 9.9.9.9 / 149.112.112.112 2620:fe::fe / 2620:fe::9
OpenDNS 208.67.222.222 / 208.67.220.220 2620:119:35::35 / 2620:119:53::53

Always confirm addresses on the provider’s own website before relying on them.

Method 1: Change DNS in Windows 11 Settings

This is the method most people should use, and it is the only one that sets up DNS over HTTPS in the interface.

Steps

  1. Open Settings > Network & internet and choose Wi-Fi or Ethernet.
  2. For Wi-Fi, click Hardware properties; for Ethernet, click your connection.
  3. Next to DNS server assignment, click Edit and switch from Automatic (DHCP) to Manual.
  4. Turn on IPv4, enter the preferred and alternate DNS, and repeat for IPv6 if your network uses it.
  5. Click Save.

Turn on DNS over HTTPS

In the same dialog, set DNS over HTTPS to On (automatic template) for supported providers such as Cloudflare, Google and Quad9. Windows will encrypt lookups to those servers.

Method 2: Use Control Panel

Press Win + R, type ncpa.cpl and press Enter. Right-click your adapter, choose Properties, select Internet Protocol Version 4 (TCP/IPv4), click Properties, choose Use the following DNS server addresses, and enter the two addresses. Repeat for IPv6 if needed.

When this method is useful

The classic dialog is handy on PCs with several adapters, VPN adapters, or when Settings hides an option. It does not offer the DNS over HTTPS switch.

Method 3: Change DNS With Commands

Commands are faster when you set up several machines or want a script.

PowerShell

Find your adapter name with Get-NetAdapter, then run, for example: Set-DnsClientServerAddress -InterfaceAlias "Wi-Fi" -ServerAddresses ("1.1.1.1","1.0.0.1"). To go back to automatic DNS, run Set-DnsClientServerAddress -InterfaceAlias "Wi-Fi" -ResetServerAddresses.

netsh in Command Prompt

In an elevated Command Prompt: netsh interface ip set dns name="Wi-Fi" static 1.1.1.1 and netsh interface ip add dns name="Wi-Fi" 1.0.0.1 index=2. Use netsh interface ip set dns name="Wi-Fi" dhcp to undo.

Method 4: Use a DNS Switching Tool

Several Windows utilities include a DNS picker. The Optimizer by hellzerg has one with a pre-made list (Cloudflare, Quad9, Google, OpenDNS, AdGuard, CleanBrowsing and others) plus a DNS cache flush button. The project is deprecated, but this kind of setting is stable across Windows versions. You can also change DNS on your router to cover every device on the network at once.

Check the Change and Troubleshoot

Confirm the new DNS is active

Run ipconfig /all and look at the DNS Servers line for your adapter. Then flush the old cache with ipconfig /flushdns; our guide on how to flush DNS explains the details.

If sites stop loading

Check for typos in the addresses, try the alternate server alone, and remember that VPN software and some security suites override DNS settings. Setting DNS back to Automatic (DHCP) restores the original behaviour.

Frequently Asked Questions

What is the best DNS for Windows 11?

There is no single best option. Cloudflare and Google are fast and widely available, Quad9 adds malware blocking, and OpenDNS offers optional filtering.

Does changing DNS affect my internet speed?

Only name lookups. Pages may start loading slightly sooner, but download speed does not change.

Conclusion

The quickest way to change DNS in Windows 11 is Settings, where you can also turn on DNS over HTTPS. Use Control Panel or PowerShell when you need more control, and flush the cache afterwards. If you want to block specific domains locally instead, see our guide to the Windows 11 hosts file.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top