
DNS (Domain Name System) turns names like example.com into IP addresses. By default, Windows uses the DNS servers your router or internet provider hands out, which are not always the fastest, most reliable or most private. This guide shows how to set custom DNS servers in Windows 10 and Windows 11 through Settings, Control Panel, Command Prompt and PowerShell, how to enable encrypted DNS over HTTPS, how to verify and flush DNS, and what to do if a change breaks your connection.
Quick answerOpen Settings → Network & Internet, open your Wi-Fi or Ethernet connection's properties, click Edit next to DNS server assignment, choose Manual, turn on IPv4, and enter a DNS server such as 1.1.1.1 and 1.0.0.1. Or in PowerShell as administrator: Set-DnsClientServerAddress -InterfaceAlias "Ethernet" -ServerAddresses 1.1.1.1,1.0.0.1.
Why change your DNS server?
- Speed: a fast public resolver can make websites start loading sooner.
- Reliability: some ISP resolvers are slow or fail.
- Privacy and security: public resolvers support encrypted DNS, and some block known malware domains.
- Filtering: family-safe resolvers block adult content.
- Testing: point at your own DNS server or check whether a DNS change has propagated.
Popular public DNS servers
| Provider | IPv4 | IPv6 |
|---|---|---|
| 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 (blocks malicious domains) | 9.9.9.9, 149.112.112.112 | 2620:fe::fe, 2620:fe::9 |
Method 1: Settings app (Windows 11)
- Open Settings → Network & Internet.
- Click Wi-Fi or Ethernet, then your connection (for Wi-Fi, choose Hardware properties or the network's properties).
- Next to DNS server assignment, click Edit and switch from Automatic (DHCP) to Manual.
- Turn on IPv4 and enter the Preferred DNS and Alternate DNS.
- Optionally set DNS over HTTPS to On (automatic template) for supported providers such as Cloudflare, Google and Quad9. Repeat for IPv6 if you use it, then click Save.
On Windows 10, go to Settings → Network & Internet → Status → Properties (or Wi-Fi → your network), then use IP settings → Edit. Windows 10 does not offer the DNS over HTTPS option in Settings.
Method 2: Control Panel (Windows 10 and 11)
- Press Win + R, type
ncpa.cpland press Enter to open Network Connections. - Right-click your active adapter and choose Properties.
- Select Internet Protocol Version 4 (TCP/IPv4) and click Properties.
- Choose Use the following DNS server addresses and enter your preferred and alternate servers.
- Click OK, then Close. Repeat for TCP/IPv6 if needed.
Method 3: PowerShell
Open PowerShell as administrator and list your adapters:
Get-NetAdapter | Where-Object Status -eq Up
Set DNS servers on the adapter by its name:
Set-DnsClientServerAddress -InterfaceAlias "Ethernet" -ServerAddresses 1.1.1.1,1.0.0.1
Go back to automatic DNS from DHCP:
Set-DnsClientServerAddress -InterfaceAlias "Ethernet" -ResetServerAddresses
This is the quickest method on a Windows VPS or for scripting several machines.
Method 4: Command Prompt (netsh)
netsh interface ipv4 set dnsservers name="Ethernet" static 1.1.1.1 primary
netsh interface ipv4 add dnsservers name="Ethernet" 1.0.0.1 index=2
To return to DHCP: netsh interface ipv4 set dnsservers name="Ethernet" source=dhcp.
Verify and flush DNS
ipconfig /all
nslookup example.com
ipconfig /flushdns
ipconfig /all lists the DNS servers in use for each adapter. nslookup shows which server answered. ipconfig /flushdns clears the local DNS cache so new settings and DNS record changes take effect immediately. In PowerShell, Get-DnsClientServerAddress and Resolve-DnsName example.com do the same jobs.
Troubleshooting
- No internet after the change: check for typing errors in the addresses, or switch back to automatic DNS.
- Company network resources stopped working: internal names are often resolved only by your organisation's DNS servers. Keep the DNS settings your IT team provides on work devices.
- A VPN overrides DNS: many VPN clients set their own DNS while connected; that is normal.
- Settings change back: another program (VPN, security software) or a group policy may be managing DNS.
Can you install a DNS server on Windows 10?
The Windows DNS Server role is only available on Windows Server, not on Windows 10 or 11. On a Windows Server VPS, add it with Install-WindowsFeature DNS -IncludeManagementTools and manage it in DNS Manager. On a Windows 10 or 11 PC, third-party DNS server software can be used for testing.
Frequently asked questions
What is the best DNS server for Windows?
Cloudflare (1.1.1.1) is often the fastest, Google (8.8.8.8) is very reliable, and Quad9 (9.9.9.9) blocks known malicious domains. Test from your own location to see which is quickest for you.
How do I check my DNS settings in Windows 10?
Run ipconfig /all in Command Prompt and look for "DNS Servers" under your active adapter.
Do I need to restart after changing DNS?
No. Changes apply immediately. Run ipconfig /flushdns to clear cached lookups.
Does Windows 10 support DNS over HTTPS?
Not through Settings. Windows 11 supports it natively; on Windows 10, browsers such as Chrome, Edge and Firefox can use DNS over HTTPS themselves.


