Changing DNS servers tells Windows which service to ask when it turns a website name into an IP address. You can set DNS for one Wi-Fi or Ethernet connection, or use a command-line method; have the DNS provider’s server addresses ready and use an administrator account for methods that require it.
What You’ll Need
- A Windows 11 or Windows 10 PC and permission to change network settings.
- The preferred and, if supplied, alternate DNS addresses from a provider you trust. Common public DNS services publish IPv4 and sometimes IPv6 addresses; check the provider’s current documentation rather than guessing.
- For command-line methods, an administrator account. A current connection name, such as Wi-Fi or Ethernet, is helpful.
Step-by-Step
Choose one of the five methods below. Methods 1 and 2 use Windows Settings; method 3 uses the classic adapter panel; methods 4 and 5 use commands. Do not apply all five: they are alternatives, and later changes can overwrite earlier settings.
Method 1: Windows 11 Settings
- Open Start > Settings > Network & internet.
- Select Wi-Fi and then the connected network’s properties, or select Ethernet for a wired connection.
- Find DNS server assignment and select Edit.
- Change the drop-down from Automatic (DHCP) to Manual. Turn on IPv4.
- Enter the provider’s preferred DNS address in Preferred DNS, and its second address in Alternate DNS, if available. Leave other settings unchanged unless your provider instructs otherwise.
- Select Save. Reconnect to the network or turn Wi-Fi off and back on, then test by opening a few websites.
Method 2: Windows 10 Settings
- Open Start > Settings > Network & Internet.
- Choose Wi-Fi or Ethernet, then select the connected network or Change adapter options. Depending on your Windows 10 build, the available route and labels may differ.
- If your network’s properties page offers DNS assignment, select Edit, switch from automatic to manual, and enable IPv4. Otherwise, continue with Method 3, which works through the adapter properties.
- Enter the preferred and alternate DNS addresses, save, and reconnect. If the page also offers IPv6 DNS, only enter IPv6 addresses supplied by your DNS provider.
- Visit several sites to confirm name resolution works. Repeat for another network adapter only if you want DNS changed on that connection too.
Method 3: Network Connections adapter properties
- Press Windows key + R, type
ncpa.cpl, and press Enter. - Right-click the active Wi-Fi or Ethernet adapter and choose Properties. Approve a permission prompt if shown.
- Select Internet Protocol Version 4 (TCP/IPv4), then select Properties.
- Select Use the following DNS server addresses. Enter the preferred and alternate IPv4 addresses in their labeled fields.
- Select OK, then Close. For IPv6 DNS, select Internet Protocol Version 6 (TCP/IPv6) and enter valid IPv6 addresses separately. Do not put IPv4 addresses in IPv6 fields.
- Disconnect and reconnect, then test websites. To return to router-provided DNS, reopen the IPv4 properties and select Obtain DNS server address automatically.
Method 4: Command Prompt with netsh
- Open Start, search for Command Prompt, choose Run as administrator, and approve the prompt.
- Run
netsh interface show interfaceto find the exact interface name. Names containing spaces must be enclosed in quotation marks in later commands. - Set the preferred IPv4 server, replacing the example interface and address with your own:
netsh interface ipv4 set dnsservers name="Wi-Fi" static 1.1.1.1 primary. - Add a secondary server if your provider supplies one:
netsh interface ipv4 add dnsservers name="Wi-Fi" 1.0.0.1 index=2. These addresses are examples only; use the addresses you intend to use. - Check the result with
ipconfig /all. To restore automatic DNS, runnetsh interface ipv4 set dnsservers name="Wi-Fi" source=dhcp, changing the interface name as needed.
Method 5: PowerShell
- Right-click Start and open Terminal (Admin) or Windows PowerShell (Admin).
- Run
Get-NetAdapterand note the active adapter’s name and status. - Set IPv4 DNS, replacing the interface name and sample addresses:
Set-DnsClientServerAddress -InterfaceAlias "Wi-Fi" -ServerAddresses 1.1.1.1,1.0.0.1. - Confirm the configured addresses with
Get-DnsClientServerAddress -InterfaceAlias "Wi-Fi". If needed, include the correct address family when reviewing results. - To restore automatic DNS from DHCP, run
Set-DnsClientServerAddress -InterfaceAlias "Wi-Fi" -ResetServerAddresses. Reconnect and test after making either change.
Common Mistakes
- Using an address from the wrong protocol: IPv4 fields need IPv4 addresses; IPv6 fields need IPv6 addresses.
- Changing the wrong adapter: A setting on Ethernet does not necessarily affect Wi-Fi. Check which connection is active.
- Entering a gateway instead of DNS: A router address may work as a DNS forwarder, but it is not automatically the public DNS address you meant to set.
- Forgetting DHCP behavior: A router, VPN, workplace policy, or network-management tool may supply or override DNS settings.
- Mixing methods without checking: Settings apply to an adapter, so review the active adapter after using another method.
Tips
- Write down the original settings before changing them, or note whether DNS was set to automatic. That makes rollback straightforward.
- Use a preferred and alternate address from the same provider when possible. An alternate is a fallback, not necessarily a faster server.
- After a change, open Command Prompt and run
ipconfig /flushdnsto clear Windows’ cached DNS answers. This does not fix an incorrect server address, but it can help remove stale results. - For a laptop, remember that Wi-Fi networks and Ethernet adapters may have separate settings. Check each connection you use.
Troubleshooting
If websites stop loading after the change, first recheck every digit and make sure the server address is in the correct IPv4 or IPv6 field. Try the alternate address, then switch back to automatic DNS to determine whether the problem is specific to the chosen servers.
If you can reach a site by IP address but not by its name, DNS resolution is a likely issue. Run ipconfig /flushdns, disconnect and reconnect, and try again. If neither names nor IP addresses work, the cause may be the internet connection rather than DNS.
If a command reports an error, check that the terminal is elevated and that the interface alias exactly matches the name shown by Get-NetAdapter or netsh interface show interface. Close extra spaces or quotation-mark errors and retry. On managed work or school devices, contact the administrator instead of repeatedly overriding policy.
If settings revert, check whether the network uses DHCP, a VPN, device-management software, or router controls that reapply DNS. You may need to make the change at the router or ask its administrator. Restore the original setting if the connection remains unreliable.
Frequently Asked Questions
Does changing DNS change my internet provider?
No. It changes the service Windows asks to look up domain names; your internet connection still comes from the same network provider.
Do I need to change DNS on both Wi-Fi and Ethernet?
Only if you use both and want the same setting on each. Windows stores settings by adapter or network, so changing one may not change the other.
Should I enter an alternate DNS server?
Use one if your provider supplies it. It can offer a fallback if the preferred server cannot be reached; do not invent an address.
How can I undo a DNS change?
In adapter properties, choose Obtain DNS server address automatically. In Settings, return DNS assignment to automatic, or use the reset command in the method you used.
Will changing DNS make my connection faster?
Not necessarily. DNS can affect how quickly a domain lookup completes, but it does not increase your internet plan’s bandwidth or fix a weak Wi-Fi signal.
Why does DNS change back after I reconnect?
DHCP, VPN software, a router, or device-management policy may set DNS again. Check those settings or ask the network administrator.
Related
General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.
More in this bed
- Apps to Install for a New Mac: A Practical Starter List
- Show or Hide Thumbnails in Windows 10
- Choose a Loud Bluetooth Speaker for Your Gathering
- iPhone X IMEI and Serial Number: How to Find Them
- Access to Compressed Zipped Folder Is Denied in Windows 10
- Erase Microsoft Surface Data Without Booting Windows