# How to Change DNS Settings in Windows 10 and 11

> Set a custom DNS server in Windows through Settings or netsh, flush the resolver cache, and tell a DNS problem apart from a real connection problem.

- Source: https://zepe.online/guides/change-dns-windows-10
- Author: Robert Moca (https://zepe.online/author/robert-moca)
- Topic: Network and devices
- Published: 2026-06-15T09:00:00+00:00
- Updated: 2026-07-18T09:00:00+00:00
- Author: Zepe editorial team (https://zepe.online/editorial-standards)
- Image: https://zepe.online/img/change-dns-windows-10-featured-4296128f5e.webp

## The short answer

Go to **Settings → Network & internet**, open your connection, click **Edit** beside DNS server assignment, switch to **Manual**, turn on IPv4 and enter two servers. Then run `ipconfig /flushdns` to drop cached answers.

## Key takeaways

- If `ping 8.8.8.8` succeeds but websites will not load, the fault is DNS rather than the connection.
- DNS is set per adapter, so changing it on Wi-Fi leaves Ethernet on the old server.
- Always set an alternate server; with only one configured, a single outage takes your name resolution down entirely.
- Encrypted DNS is a checkbox in Windows 11 and hides your lookups from the network, though not from the resolver you chose.

DNS is the thing that turns a name like `example.com` into the address your computer actually connects to. By default you use whatever server your router hands out, which is almost always your internet provider's. Changing it can be quicker, can get around provider-level blocking, and is the fix for one specific failure that gets misdiagnosed constantly.

## First, confirm it really is DNS

Do this first. It takes half a minute, and it will stop you rewriting settings that were never the problem in the first place, which is where most of the wasted time in this topic goes.

### Tell DNS apart from a connection failure

1. Open a Command Prompt and run `ping 8.8.8.8`.
   This contacts an address directly, with no name lookup involved.
2. Then run `ping google.com`.
   This requires a name lookup first.
3. If the first succeeds and the second fails, DNS is the problem.
   The connection is fine; only name resolution is broken. That is exactly what this guide fixes.
4. If both fail, DNS is not the problem.
   Work through the guide on [Wi-Fi connection problems](https://zepe.online/guides/connect-wifi-windows-laptop) instead.

> **Key point — The symptom that always means DNS**
>
> Pages fail to load with a name-not-resolved error while a direct IP address works, or some sites load and others do not with no pattern. If a browser can reach a site by IP but not by name, no amount of adapter resetting will help.

## Choosing a DNS server

**Public DNS resolvers**

| Provider | Primary | Alternate | Notable for |
| --- | --- | --- | --- |
| Cloudflare | `1.1.1.1` | `1.0.0.1` | Speed; a published no-logging policy |
| Cloudflare (family) | `1.1.1.3` | `1.0.0.3` | Blocks malware and adult content |
| Google | `8.8.8.8` | `8.8.4.4` | Reliability and global reach |
| Quad9 | `9.9.9.9` | `149.112.112.112` | Blocks known malicious domains |
| OpenDNS | `208.67.222.222` | `208.67.220.220` | Configurable content filtering |
| Your router | usually `192.168.1.1` | — | Local name resolution on your network |

There is no single right answer. Cloudflare is generally fastest, Quad9 blocks known malicious domains as a security measure, and the family variants filter content. Your provider's default is not necessarily worse, and on some networks it is measurably faster because it is physically closer.

## Changing DNS through Settings

### Windows 11

1. Open **Settings → Network & internet**.
2. Click **Wi-Fi** or **Ethernet**, then the connection itself.
   On Wi-Fi you may need to click **Hardware properties**.
3. Next to **DNS server assignment**, click **Edit**.
4. Change **Automatic (DHCP)** to **Manual** and turn on **IPv4**.
   Leave IPv6 off unless you know your connection uses it, and if you do turn it on, set IPv6 servers too rather than leaving it half configured.
5. Enter a preferred and an alternate server, then click **Save**.
   Always set the alternate. With one server configured, a single outage takes name resolution down completely.

### Windows 10, via the classic dialog

1. Press **Win + R**, type `ncpa.cpl` and press Enter.
   This opens Network Connections directly, which is faster than navigating Settings.
2. Right-click your adapter and choose **Properties**.
3. Select **Internet Protocol Version 4 (TCP/IPv4)** and click **Properties**.
4. Choose **Use the following DNS server addresses** and enter both servers, then click OK.
   This dialog exists on Windows 11 too and is often quicker than the Settings route.

> **Careful — DNS is set per adapter**
>
> Changing it on Wi-Fi does nothing to Ethernet, and a VPN adds its own virtual adapter with its own settings. If the change appears to have no effect, check you configured the adapter that is actually carrying your traffic; the guide on [finding your MAC address](https://zepe.online/guides/find-mac-address-windows) covers identifying which one that is.

## From the command line

From an elevated prompt, `netsh` does exactly the same job, and it is much quicker if you are setting up several machines the same way rather than clicking through the same four screens repeatedly.

1. `netsh interface show interface` lists your adapters and their exact names.
2. `netsh interface ip set dns name="Wi-Fi" static 1.1.1.1` sets the primary server.
3. `netsh interface ip add dns name="Wi-Fi" 1.0.0.1 index=2` adds the alternate.
4. `netsh interface ip set dns name="Wi-Fi" dhcp` reverts to whatever the router supplies.

PowerShell is tidier: `Set-DnsClientServerAddress -InterfaceAlias "Wi-Fi" -ServerAddresses ("1.1.1.1","1.0.0.1")`, and `-ResetServerAddresses` to undo it.

## Flushing the DNS cache

Windows remembers previous lookups, so straight after changing servers you can still be getting answers from the old one, which makes it look like nothing happened. Run `ipconfig /flushdns` in any Command Prompt. It needs no administrator rights and tells you *Successfully flushed the DNS Resolver Cache*. Do this every time you change DNS, or you will spend ten minutes debugging a cache.

This is also the fix for a site that has moved and is still resolving to its old address, and for a site your machine insists is unreachable when every other device on the network can see it. `ipconfig /displaydns` shows what is currently cached, which is occasionally illuminating.

**Figure: Where a name lookup can fail**

Windows checks these in order. A stale entry in either of the first two produces a failure that looks like a server problem but is entirely local.

- **The hosts file** — C:\Windows\System32\drivers\etc\hosts overrides everything else
- **The DNS resolver cache** — Previous answers, still held. Cleared with ipconfig /flushdns
- **The configured DNS server** — Your router, your provider, or the one you set here
- **The authoritative server** — The server responsible for that domain

## The hosts file, which overrides everything

Before Windows asks any DNS server anything, it checks `C:\Windows\System32\drivers\etc\hosts`, and an entry in there wins outright no matter what you have configured. This is worth knowing because one stale line produces a genuinely baffling symptom: a single site fails on a single machine while every other device in the house loads it fine. If that is what you are seeing, check this file before you touch anything else.

Open it with Notepad running as administrator. Lines beginning `#` are comments. Unexpected entries pointing well-known domains at `127.0.0.1` are a common trick of both blocking utilities and malware, and are worth investigating rather than simply deleting.

## Encrypted DNS

By default your DNS queries travel in the clear, so anyone sitting between you and the resolver can see which names you look up. Windows 11 can encrypt them: in the same **Edit DNS settings** panel, set **DNS over HTTPS** to **On (automatic template)** after entering a server that supports it, such as Cloudflare or Google.

It is worth being precise about what this achieves. It hides your lookups from the network you are on, including a café's Wi-Fi or your provider. It does not hide them from the resolver you chose, which sees every query by definition. Choosing a resolver is choosing who gets to see that list.

> **Editor's note — On DNS and speed**
>
> Changing DNS can make browsing feel faster because name lookups resolve sooner, particularly if your provider's servers are slow or overloaded. It does not change your bandwidth and will not speed up a download in progress. Claims of dramatic speed increases from a DNS change are measuring the first few milliseconds of a page load, not the connection itself. Every command on this page runs in an ordinary Command Prompt or PowerShell window, which the guide on [opening a terminal in Windows](https://zepe.online/guides/open-terminal-windows) covers if you are not sure which one you have.

## Common questions

### How do I know if my problem is DNS?

Run `ping 8.8.8.8` and then `ping google.com`. If the first succeeds and the second fails, name resolution is broken and this guide applies. If both fail, the connection itself is down and DNS is not the cause.

### Which DNS server should I use?

Cloudflare's `1.1.1.1` and `1.0.0.1` are fast with a published no-logging policy. Quad9's `9.9.9.9` blocks known malicious domains. Google's `8.8.8.8` is highly reliable. Any of these is a reasonable choice, and your provider's default is not automatically worse, since it is often physically closer.

### Do I need to flush the DNS cache after changing servers?

Yes, otherwise Windows may keep serving cached answers from the previous server. Run `ipconfig /flushdns` in any Command Prompt. It needs no administrator rights and takes a second.

### Does changing DNS make my internet faster?

It can make browsing feel more responsive, because name lookups complete sooner, which matters most on a slow or overloaded provider resolver. It does not change your bandwidth and will not affect the speed of a download already in progress.

## Sources

- [ipconfig — Windows commands reference](https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/ipconfig) — Microsoft Learn. Supports: The /flushdns and /displaydns switches and their effect on the DNS resolver cache.
- [Fix Wi-Fi connection issues in Windows](https://support.microsoft.com/en-us/windows/fix-wi-fi-connection-issues-in-windows-9424a1f7-6a3b-65a6-4d78-7f07eee84d2c) — Microsoft Support. Supports: The adapter properties route to DNS settings and the distinction between connection and name-resolution faults.

## Related guides

- https://zepe.online/guides/connect-wifi-windows-laptop
- https://zepe.online/guides/find-mac-address-windows
- https://zepe.online/guides/open-terminal-windows

---

© 2026 Zepe. Windows is a trademark of Microsoft Corporation; this site is not affiliated with Microsoft.
