How to Change DNS Settings on Windows: A Step-By-Step Guide

To change DNS settings on Windows 11, open Settings > Network & internet, pick your Wi-Fi or Ethernet connection, select Edit next to DNS server assignment, switch to Manual and type the new addresses.

Advertisement

This guide covers Windows 11 and Windows 10 through Settings, Control Panel, PowerShell and Command Prompt, plus encrypted DNS, IPv6, checking the change, undoing it and fixing sites that stop loading.

The fastest way to change DNS on Windows 11

Write down the current DNS addresses before you start, so you can put them back. Google gives the same advice for its own resolver.

  1. Select Start > Settings > Network & internet.
  2. Select Ethernet, or select Wi-Fi > Manage known networks and choose your network.
  3. Scroll to DNS server assignment and select Edit.
  4. Change Automatic (DHCP) to Manual, then turn on the IPv4 toggle.
  5. Type the primary address in Preferred DNS and the backup in Alternate DNS, for example 1.1.1.1 and 1.0.0.1.
  6. Select Save.

The change applies to that one connection only. Repeat it for each Wi-Fi network and for Ethernet if you use both.

Which method should you use?

Every method writes the same per-adapter DNS setting. They differ in which Windows versions offer them and whether they can encrypt lookups.

Your situation Use this Why
Windows 11, one PC, want encrypted DNS Windows Settings The only route that also sets DNS over HTTPS
Windows 10 Settings > Change adapter options, or Control Panel Windows 10 has no DNS over HTTPS option, so both routes end in the same IPv4 dialog
Several PCs or a repeatable script PowerShell Set-DnsClientServerAddress One line per adapter, and -ResetServerAddresses undoes it
Older scripts or a recovery prompt Command Prompt netsh interface ipv4 set dnsservers Works from any Command Prompt, including batch files
Every device in the house should switch Your router's DNS fields One change covers phones, consoles and TVs; see the router steps in the OpenDNS guide linked below

Why Change DNS Settings on Windows?

DNS turns names such as example.com into IP addresses. By default Windows uses whatever resolver your router or internet provider hands out through DHCP.

Reason What changes Pick a resolver that offers it
Encrypted lookups DNS over HTTPS hides queries from others on the network Cloudflare, Google or Quad9 on Windows 11's built-in list
Malware and adult-content blocking Known bad domains fail to resolve Cloudflare 1.1.1.1 for Families, OpenDNS FamilyShield
Privacy commitments Published log-retention and no-ad-targeting rules Cloudflare deletes resolver logs within 25 hours
Reliability A large public resolver replaces a slow or failing provider resolver Google Public DNS answers most queries from shared Google-scale caches
Tamper resistance DNSSEC validation rejects forged answers for signed domains Cloudflare and Google both validate DNSSEC

Speed gains are not guaranteed. A resolver only speeds up the lookup step, and pages still download from the same web servers.

Choose a DNS Provider Before You Start

Enter both addresses of one provider. The second one takes over if the first stops answering. The IPv6 pair is only needed if your connection uses IPv6.

Advertisement
Provider IPv4 (preferred, alternate) IPv6 Filtering
Cloudflare 1.1.1.1 1.1.1.1, 1.0.0.1 2606:4700:4700::1111, 2606:4700:4700::1001 None
Cloudflare for Families (malware) 1.1.1.2, 1.0.0.2 2606:4700:4700::1112, 2606:4700:4700::1002 Malware and phishing
Cloudflare for Families (malware and adult) 1.1.1.3, 1.0.0.3 2606:4700:4700::1113, 2606:4700:4700::1003 Malware, phishing and adult content
Google Public DNS 8.8.8.8, 8.8.4.4 2001:4860:4860::8888, 2001:4860:4860::8844 Rarely blocks; not a malware filter
Quad9 9.9.9.9, 149.112.112.112 2620:fe::fe, 2620:fe::fe:9 Listed by Microsoft as a known DoH server
OpenDNS 208.67.222.222, 208.67.220.220 Not listed on OpenDNS's setup page Basic protection; more with a free OpenDNS Home account
OpenDNS FamilyShield 208.67.222.123, 208.67.220.123 Not listed on OpenDNS's setup page Adult content blocked, preconfigured

For provider-specific setup and testing, see how to use Cloudflare's 1.1.1.1 for secure DNS or how to use OpenDNS on your router, PC, tablet or smartphone.

How to Change DNS Settings in Windows Settings

This is the Windows 11 route with IPv6 and encryption included. Only addresses on Microsoft's known list, currently Cloudflare, Google and Quad9, get the automatic DNS over HTTPS template.

  1. Open Settings > Network & internet and select Ethernet, or Wi-Fi > Manage known networks > your network.
  2. Select Edit next to DNS server assignment, then choose Manual.
  3. Turn on IPv4 and enter the Preferred DNS and Alternate DNS addresses.
  4. Under each address, set DNS over HTTPS to On (automatic template). Use On (manual template) only if your provider gave you a DoH URL.
  5. Leave Fallback to plaintext off for strict encryption, or turn it on so lookups still work when DoH fails.
  6. Turn on IPv6 and enter the provider's IPv6 pair the same way, if your connection uses IPv6.
  7. Select Save.

Microsoft's support page shows the same DNS fields under IP assignment > Edit when you set a manual IP address. Use DNS server assignment when you only want to change DNS and keep the IP address automatic.

On Windows 10, the Settings app has no DNS over HTTPS option. Select Settings > Network & Internet > Change adapter options and continue with step 3 of the Control Panel method below.

Advertisement

How to Change DNS Settings Using Control Panel

The classic adapter dialog works on Windows 10 and Windows 11. It cannot turn on DNS over HTTPS.

  1. Open Control Panel > Network and Internet > Network and Sharing Center.
  2. Select Change adapter settings.
  3. Right-click your Wi-Fi or Ethernet connection and select Properties.
  4. On the Networking tab, select Internet Protocol Version 4 (TCP/IPv4), then Properties.
  5. Choose Use the following DNS server addresses and type the preferred and alternate addresses.
  6. Select OK.
  7. Repeat with Internet Protocol Version 6 (TCP/IPv6) and the IPv6 pair if you use IPv6, then select OK.

Change only the DNS part of the dialog. DNS can be manual while the IP address itself stays automatic.

How to Change DNS Settings with Command Prompt or PowerShell

Open Windows PowerShell or Command Prompt as administrator: search for it on the taskbar, then select Run as administrator. Replace Wi-Fi in each command with your own adapter name.

Find the name of your network adapter

Every command targets one interface by its friendly name or index number.

Advertisement
  1. In PowerShell, run Get-DnsClientServerAddress.
  2. Note the InterfaceAlias of the connection you use, such as Wi-Fi or Ethernet, and its current DNS servers.
  3. In Command Prompt, netsh interface ipv4 show dnsservers lists the same interfaces by name.

Change DNS using PowerShell

Set-DnsClientServerAddress adds static DNS servers that override the DNS your router assigns through DHCP.

  1. Run Set-DnsClientServerAddress -InterfaceAlias "Wi-Fi" -ServerAddresses ("1.1.1.1","1.0.0.1").
  2. Add -Validate before running it if you want Windows to check that the servers respond first.
  3. Run Get-DnsClientServerAddress -InterfaceAlias "Wi-Fi" to confirm the new list. The set command itself prints nothing on success.

Change DNS using Command Prompt

netsh sets the first server and then appends the backup at a numbered position.

  1. Run netsh interface ipv4 set dnsservers name="Wi-Fi" source=static address=1.1.1.1 register=primary.
  2. Run netsh interface ipv4 add dnsservers name="Wi-Fi" address=1.0.0.1 index=2.
  3. Run netsh interface ipv4 show dnsservers name="Wi-Fi" to check the list.

Set IPv6 DNS servers

IPv6 keeps its own DNS list, so an IPv4-only change leaves IPv6 lookups on the old resolver.

  1. Run netsh interface ipv6 set dnsservers name="Wi-Fi" source=static address=2606:4700:4700::1111 register=primary.
  2. Run netsh interface ipv6 add dnsservers name="Wi-Fi" address=2606:4700:4700::1001 index=2.
  3. Check with Get-DnsClientServerAddress -InterfaceAlias "Wi-Fi" -AddressFamily IPv6.

Run ipconfig /flushdns afterwards so Windows forgets answers cached from the old server. The ipconfig /flushdns guide explains what that cache holds.

How to Verify Your New DNS Settings

Check both what Windows has stored and which resolver actually answers.

  1. In PowerShell, run Get-DnsClientServerAddress. Your adapter should list the new IPv4 and IPv6 addresses.
  2. In Command Prompt, run ipconfig /all and read the DNS Servers lines under your adapter.
  3. Run nslookup example.com. With no server named, nslookup uses your default DNS server, so an answer here proves the new resolver responds.
  4. Open your provider's test page: one.one.one.one/help for Cloudflare, or welcome.opendns.com for OpenDNS.
  5. For Google Public DNS, load a site, then close and reopen the browser and refresh several times so a cached page does not fool you.

If the cmdlet shows the new servers but a test page says you are not using them, a browser's own secure DNS setting may be sending lookups elsewhere.

How to switch back to automatic DNS

  1. Windows 11 Settings: select Edit next to DNS server assignment, choose Automatic (DHCP) and select Save.
  2. Control Panel: reopen the IPv4 and IPv6 properties, switch from Use the following DNS server addresses back to automatic DNS, and select OK.
  3. PowerShell: run Set-DnsClientServerAddress -InterfaceAlias "Wi-Fi" -ResetServerAddresses to return to the DHCP-assigned servers.
  4. Command Prompt: run netsh interface ipv4 set dnsservers name="Wi-Fi" source=dhcp, and the same with ipv6 if you changed IPv6.

Troubleshooting Common DNS Problems

Websites stop loading after you change DNS

A mistyped address, or a resolver your network cannot reach.

  1. Check the DNS server addresses with Get-DnsClientServerAddress and compare them with the provider table above.
  2. Test DNS resolution directly: run nslookup example.com 1.1.1.1, then nslookup example.com 8.8.8.8. If one server answers and the other times out, switch to the working provider.
  3. If nslookup reports timed out or No response from server, the resolver is unreachable from your network.
  4. Switch back to automatic DNS to confirm the connection itself works.

Windows still uses the old DNS server

Cached answers, the wrong adapter, or a browser with its own secure DNS provider.

  1. Flush cached DNS records with ipconfig /flushdns, then retest.
  2. Run Get-DnsClientServerAddress and confirm you changed the adapter that is actually connected.
  3. Check your browser's secure DNS setting, which can use its own provider instead of Windows' servers.

You can't change the DNS settings, or they will not stick

The PC is managed by an organization, or the command ran without administrator rights.

  1. Rerun PowerShell or Command Prompt with Run as administrator.
  2. On a work or school PC, ask the IT administrator, because network settings may be set centrally.
  3. Make sure you are editing DNS server assignment, not a different network profile under Manage known networks.

The DNS over HTTPS option is missing or cannot be turned on

Windows 10 has no DoH setting, and Windows 11 only enables the automatic template for servers on its known list.

  1. On Windows 10, use your browser's secure DNS setting instead.
  2. On Windows 11, run Get-DnsClientDohServerAddress to list the servers Windows knows.
  3. Pick a Cloudflare, Google or Quad9 address, or choose On (manual template) with your provider's DoH URL.

Public Wi-Fi or hotel sign-in pages do not appear

Manual DNS can block the captive portal that the network uses for sign-in.

  1. Switch the connection back to Automatic (DHCP).
  2. Connect and finish the sign-in page.
  3. Re-enter your DNS addresses once you are online.

Nothing connects even with automatic DNS

The network stack itself needs a reset, not the DNS setting.

  1. Open Command Prompt as administrator.
  2. Run netsh winsock reset, then netsh int ip reset.
  3. Run ipconfig /release, then ipconfig /renew, then ipconfig /flushdns.
  4. Restart the PC and test again.
PowerShell window listing DNS servers that support encrypted DoH lookups
Run Get-DnsClientDohServerAddress in PowerShell to see which servers Windows already recognizes for DNS over HTTPS. (Image: Microsoft)

Bottom Line

On Windows 11, set DNS through Settings > DNS server assignment with a Cloudflare, Google or Quad9 pair and turn on DNS over HTTPS; on Windows 10, use the IPv4 and IPv6 properties dialog. The Settings route is the only one that encrypts lookups without extra software, and those three providers get Microsoft's automatic DoH template. Script with PowerShell only when you manage several PCs, and confirm the result with Get-DnsClientServerAddress either way.

Frequently Asked Questions

How do I change DNS settings on Windows 11?

Open Settings > Network & internet, select Ethernet or your Wi-Fi network, and select Edit next to DNS server assignment. Choose Manual, turn on IPv4, enter the Preferred DNS and Alternate DNS addresses, optionally turn on DNS over HTTPS, and select Save.

How do I change DNS settings on Windows 10?

Open Settings > Network & Internet > Change adapter options, right-click your connection and select Properties. Select Internet Protocol Version 4 (TCP/IPv4) > Properties, choose Use the following DNS server addresses, enter both addresses and select OK.

How do I change DNS settings on a PC or laptop?

A Windows laptop uses the same steps as a desktop PC. Change DNS for the connection you use, usually Wi-Fi on a laptop, and repeat for each Wi-Fi network you join, because Windows stores DNS per network.

Why change DNS settings?

People change DNS to encrypt lookups with DNS over HTTPS, to block malware or adult sites through a filtering resolver, to use a provider with published privacy rules, or to replace a slow or failing resolver from their internet provider.

Which DNS server should I use on Windows?

Cloudflare (1.1.1.1), Google (8.8.8.8) and Quad9 (9.9.9.9) work with Windows 11's automatic DNS over HTTPS. Choose Cloudflare for Families or OpenDNS FamilyShield if you want adult content blocked on the PC.

Do I need to change DNS for both IPv4 and IPv6?

Yes, if your connection uses IPv6. Windows keeps a separate DNS list for each protocol, so changing only IPv4 can leave IPv6 lookups on your provider's resolver. Enter the provider's IPv6 pair in the IPv6 section as well.

Will changing DNS make my internet faster?

Only the name lookup step can get faster, and only if your current resolver is slow. Download speed does not change, because pages still come from the same web servers over the same connection.

How do I change DNS settings with PowerShell?

Open PowerShell as administrator and run Set-DnsClientServerAddress -InterfaceAlias "Wi-Fi" -ServerAddresses ("1.1.1.1","1.0.0.1"), using your own adapter name. Run Get-DnsClientServerAddress to confirm, and add -ResetServerAddresses to go back to automatic DNS.

How can I check that Windows is using my new DNS server?

Run Get-DnsClientServerAddress in PowerShell or ipconfig /all in Command Prompt to see the configured servers. Then open your provider's test page, such as one.one.one.one/help for Cloudflare or welcome.opendns.com for OpenDNS.

Why can't I change the host DNS settings?

The most common causes are a PC managed by a work or school organization, or a command run without administrator rights. Rerun the command as administrator, and ask your IT administrator if the network settings are controlled centrally.

What should I do if websites stop loading after I change DNS?

Recheck the addresses for typos, then run nslookup example.com against your new server. If it times out, switch to another provider or back to Automatic (DHCP), and run ipconfig /flushdns before testing again.

How do I change DNS settings for all Wi-Fi networks?

Windows stores DNS per network, so each Wi-Fi profile needs its own change. To cover every device on your home network at once, change the DNS servers on your router instead of on each PC.

Philip Celasco

Philip is a Texas-based technology writer and IT administrator at Techdows.com with more than 10 years of experience creating practical content for everyday users and professionals. He specializes in web browsers, particularly Chromium-based platforms such as Google Chrome, Microsoft Edge, Brave, and Opera. Through his work as an IT administrator, Philip has hands-on experience managing devices, configuring browser policies, troubleshooting software and network issues, and helping people resolve problems that affect productivity and security. His articles are based on practical testing and real-world technical experience. He covers browser settings, extensions, performance problems, privacy controls, security features, and Windows troubleshooting. Outside work, Philip enjoys the quieter side of life in Texas and stepping away from the screen when he can. He has two kids, two cats and loves to play golf with his mother during the weekends.

Leave a Reply

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