How To Change The DNS Server In Windows 11 (2026)
You can change the DNS server in Windows 11 from the Settings app.
Open Settings, go to Network and internet, open your Wi-Fi or Ethernet connection, and select Edit next to DNS server assignment.
This guide also covers IPv6, DNS over HTTPS, Control Panel, command-line methods, and how to switch back to automatic.
Quick answer: change DNS in Settings
| Step | What to do |
|---|---|
| 1 | Open Settings > Network & internet |
| 2 | Select Ethernet, or for Wi-Fi open Manage known networks and choose your network |
| 3 | Select Edit next to DNS server assignment |
| 4 | Choose Manual and turn on IPv4 |
| 5 | Enter the Preferred DNS and Alternate DNS addresses, then select Save |
These paths come from Microsoft’s page on essential network settings and tasks in Windows.
Open the right network page
Microsoft gives a different path for each connection type.
| Connection | Settings path |
|---|---|
| Wi-Fi | Settings > Network & internet > Wi-Fi > Manage known networks, then choose the network |
| Ethernet | Settings > Network & internet > Ethernet, then select your connected network |
A faster route is to right-click the Network or Wi-Fi icon on the taskbar and select Network and internet settings.
DNS is set per connection, so repeat the change for each Wi-Fi network or adapter you want to use it on.
Set a DNS server for IPv4
- On your connection’s page, find the DNS server assignment line and select Edit.
- In the Edit IP settings window, change the drop-down from Automatic (DHCP) to Manual.
- Turn on the IPv4 toggle.
- Type an address in Preferred DNS and another in Alternate DNS.
- Set DNS over HTTPS if you want it, then select Save.
Microsoft says Automatic (DHCP) means your router or access point supplies the DNS address, and it recommends that setting.
Windows Central says a restart may be needed before the change takes effect.
Windows Central also lists an optional Alternative DNS encryption setting for the second address, and Pureinfotech says each server can have its own fallback-to-plaintext choice.
Public DNS addresses you can enter
Microsoft’s DNS over HTTPS page lists Cloudflare, Google and Quad9 among its default known DoH servers, and Windows Central and Pureinfotech add OpenDNS.
| Provider | Preferred | Alternate |
|---|---|---|
| Cloudflare | 1.1.1.1 | 1.0.0.1 |
| Google Public DNS | 8.8.8.8 | 8.8.4.4 |
| Quad9 | 9.9.9.9 | 149.112.112.112 |
| OpenDNS | 208.67.222.222 | 208.67.220.220 |
Pick one provider and use both of its addresses, rather than mixing providers.
Set a DNS server for IPv6
- Select Edit next to DNS server assignment.
- Choose Manual, then turn on the IPv6 toggle.
- Enter the Preferred DNS and Alternate DNS addresses.
- Select Save.
Microsoft’s Learn page lists the IPv6 addresses for the same providers, such as 2606:4700:4700::1111 for Cloudflare and 2001:4860:4860::8888 for Google.
DNS over HTTPS options
Microsoft says the DNS over HTTPS setting is not available in Windows 10, but it is in Windows 11.
| Option | What it does |
|---|---|
| Off | Queries go to the DNS server unencrypted |
| On (automatic template) | Queries are encrypted over HTTPS using default or auto-discovered settings |
| On (manual template) | Queries are encrypted using the template you enter |
| Fallback to plaintext: On | Unencrypted queries are allowed if HTTPS fails |
| Fallback to plaintext: Off | Queries are not sent if HTTPS fails |
Microsoft’s DoH page, which is written for Windows Server, says the encryption choice is enabled only when the address is on Windows’ known DoH server list.
Microsoft says the Fallback to plaintext choice is available with either the automatic or the manual template.
Turning fallback off is the strictest choice, because Windows sends no query at all when HTTPS fails, so pages will not load if the server cannot do DoH.
Go back to automatic DNS
- Return to your connection’s page and select Edit next to DNS server assignment.
- Choose Automatic (DHCP).
- Select Save.
Pureinfotech describes the same revert step for its Settings method.
Change DNS in Control Panel
Pureinfotech and Windows Central both document the older adapter dialog, which cannot turn on DNS over HTTPS.
- Open Control Panel, then Network and Internet, then Network and Sharing Center.
- Select Change adapter settings.
- Right-click your adapter and select Properties.
- Select Internet Protocol Version 4 (TCP/IPv4) and click Properties.
- Select Use the following DNS server addresses and enter both addresses.
- Click OK, then Close.
Windows Central adds that you can click Advanced, open the DNS tab and use Add to include more servers.
To revert, select Obtain DNS server address automatically and click OK.
Change DNS from the command line
Pureinfotech says to open Command Prompt or PowerShell as administrator for these methods.
netsh interface ip set dns name=”Ethernet0″ static 1.1.1.1 netsh interface ip add dns name=”Ethernet0″ 1.0.0.1 index=2Replace Ethernet0 with your adapter name, which the ipconfig /all command lists.
Windows Central says additional servers can be added the same way with higher index values, such as index=3.
Pureinfotech says you can verify the result by running ipconfig /all again and checking the DNS servers line.
The PowerShell route uses the cmdlet Microsoft Learn documents.
Set-DnsClientServerAddress -InterfaceIndex 12 -ServerAddresses 208.67.222.222, 208.67.220.220| Goal | Command |
|---|---|
| Revert with netsh | netsh interface IP set DNS “ADAPTER-NAME” DHCP |
| Revert with PowerShell | Get-NetAdapter “ADAPTER-NAME” | Set-DnsClientServerAddress -ResetServerAddresses |
Microsoft Learn says servers set this way override any DHCP configuration for that interface.
Clear the DNS cache after changing servers
Microsoft describes ipconfig /flushdns as flushing and resetting the DNS client resolver cache.
It says you can use it during DNS troubleshooting to discard negative cache entries and any other entries added dynamically.
ipconfig /flushdnsMicrosoft’s command reference lists ipconfig /displaydns as the way to view what the cache currently holds.
Which method to use
| If you want to | Use |
|---|---|
| Change DNS and use DNS over HTTPS | Settings > Network & internet |
| Use the older dialog | Control Panel > Change adapter settings |
| Script the change | netsh or Set-DnsClientServerAddress |
| Undo any change | Automatic (DHCP) in Settings |
If pages still fail to load after the change, see our guide to fixing Windows 11 internet connection issues.
For a Chrome error that points to DNS, see how to fix ERR_NAME_NOT_RESOLVED.
Related guides
- How to fix Windows 11 internet connection issues
- How to fix ERR_NAME_NOT_RESOLVED on Google Chrome
- How to change DNS on an Android phone