How-To

How to Change DNS on Windows 11

Change your DNS server in Windows 11 through Settings or the command line, enable DNS over HTTPS, and flush the DNS cache for faster, safer browsing.

5 min read

Why Change DNS on Windows 11

By default Windows uses the DNS servers assigned by your router, which in turn come from your ISP (e& or Du in the UAE). Switching to a faster, privacy-first resolver can shorten page load times, block malicious domains, and enable encrypted DNS so your lookups can't be read on the network. New to this? Read What Is DNS first.

Method 1: Change DNS in Settings

  • Open Settings → Network & internet
  • Select Wi-Fi or Ethernet, then Hardware properties
  • Next to DNS server assignment, click Edit
  • Switch from Automatic to Manual and turn on IPv4
  • Enter a Preferred and Alternate DNS (e.g. 1.1.1.1 and 1.0.0.1)
  • Optionally set DNS over HTTPS to On (automatic template)
  • Click Save

Method 2: Command Line (netsh)

Open Command Prompt or PowerShell as administrator and run (replace "Wi-Fi" with your adapter name):

  • Set primary: netsh interface ip set dns name="Wi-Fi" static 1.1.1.1
  • Add secondary: netsh interface ip add dns name="Wi-Fi" 1.0.0.1 index=2
  • Flush cache: ipconfig /flushdns

Recommended DNS Servers

ProviderPreferredAlternateBest for
Cloudflare1.1.1.11.0.0.1Speed & privacy
Google8.8.8.88.8.4.4Reliability
Quad99.9.9.9149.112.112.112Security
OpenDNS208.67.222.222208.67.220.220Content filtering

Not sure which to pick? Our best DNS servers guide compares them in detail.

Enable DNS over HTTPS (DoH)

Windows 11 can encrypt your DNS queries. In the same DNS edit dialog, set the DNS over HTTPS dropdown to On (automatic template). Windows recognises Cloudflare, Google, and Quad9 automatically. This prevents anyone on your network — including your ISP — from seeing which domains you look up.

Verify and Troubleshoot

Run nslookup example.com in Command Prompt; the "Server" line shows your active resolver. If sites still load from an old address, run ipconfig /flushdns. To confirm DoH with Cloudflare, visit 1.1.1.1/help. Changing DNS won't affect bandwidth, so measure real performance with a speed test and check your connection details on What's My IP.

Ready to test your speed?

Use our free tool to measure your connection in seconds.