Technical Anshu
Tutorials Blog
⌨️ DNS Client Repair

Flush the DNS Cache and Restart the DNS Client Service The Commands in Order

Sometimes the flush everyone quotes is not enough, because the service holding the cache is itself in a bad state. This page is the complete command sequence — flush, inspect, restart the DNS Client service — with what each reply from Windows actually tells you.

✍️ Technical Anshu🪟 Windows 10 / 11⏱️ 7 minute read
🎥 Watch the full fix in the video above — every step shown live on a real Windows PC

Behind every name lookup on your PC sits a Windows service called DNS Client (service name Dnscache). It runs the resolver cache — the memory of recent answers, good and bad — and every browser depends on it. The famous ipconfig /flushdns command empties that memory, and it genuinely fixes the common case of one poisonous cached answer. But two situations defeat a plain flush: the cache refills instantly from a broken source, or the service itself is stopped, stuck or refusing commands. This page runs the whole ladder in order — flush and verify, read what is actually in the cache when a name keeps failing, restart the service the supported way, and recognise the Windows builds where Microsoft has locked the service so that a reboot is the real restart.

Command Prompt (Administrator) — flush and service check
C:\> ipconfig /flushdns Successfully flushed the DNS Resolver Cache. C:\> sc query dnscache STATE : 4 RUNNING The service is alive — a flush result can be trusted. C:\> net stop dnscache (On many current Windows 11 builds this stop is refused — see the card below before you fight it.)
👆 The sequence from this page, with the honest wrinkle shown where it belongs. Captions and layout recreated; the success line is Windows' real wording.
1

Step One — Flush, and Demand the Success Line

  1. Open Command Prompt as administrator — Start, type cmd, right-click, Run as administrator
  2. Run ipconfig /flushdns
  3. Accept nothing less than Successfully flushed the DNS Resolver Cache
  4. Retest the failing name immediately

That success line is not decoration. It is the service confirming it heard you and cleared its memory. An error instead — or a success line followed within seconds by the same failure — tells you the problem is not old memory but either the service or the source feeding it. PowerShell users get the same job from Clear-DnsClientCache, which talks to the same service.

2

Step Two — Look Inside the Cache When One Name Keeps Failing

If a single name re-fails instantly after a flush, inspect before you flush again. Run ipconfig /displaydns and search the output for the failing name (the list is long; pipe it through findstr with the name). Two findings matter:

  1. The name appears with a strange or ancient address right after a fresh lookup — your DNS server itself is handing out the bad answer, and no amount of local flushing will outrun it. Change or repair the server, covered in the main guide
  2. The name appears as a negative entry — Windows also caches failures for a short while, which is why a site that blipped once can stay down for you after it recovers for everyone else. One flush clears this; a second failure after clearing means the negative answer is being re-served upstream

Reading the cache turns a superstition (flush it again, harder) into a diagnosis (the answer is wrong at the source).

3

Step Three — Restart the DNS Client Service the Supported Way

When the service itself is unhealthy — flush errors, lookups timing out across every name, cache behaving impossibly — restart it:

  1. Press Windows + R, type services.msc, Enter
  2. Find DNS Client, confirm its Startup type is Automatic — anything else is a finding in itself; something changed it
  3. If the service is stopped, start it. If it is running and the controls allow, choose Restart
  4. Flush once more and retest

From the command line the equivalents are net stop dnscache and net start dnscache, and sc query dnscache shows the state without opening the console. A service found stopped or set to Manual on a home PC did not get that way by itself — a tuning tool or malware are the usual authors, and a security scan belongs in the same visit.

4

The Locked-Service Reality on Modern Windows — Reboot Is the Restart

Here is the part most guides quietly skip. On many current Windows 10 and 11 builds, Microsoft treats DNS Client as protected infrastructure: the Stop and Restart controls are greyed out in the console, and net stop dnscache answers that the stop is not valid for this service. This is not your PC being broken, and registry hacks that force the service off create worse problems than a stale cache.

On such a machine the supported full reset is simply a restart of the PC — a real restart from the power menu, not shutdown-and-on if Fast Startup is enabled, because Fast Startup can preserve the very state you are trying to clear. After the reboot, flush once and test. If name resolution is still broken with a healthy, running DNS Client and a cleared cache, the fault is conclusively outside this layer: the DNS server, the browser's own resolver, or the router — and the sibling guides in this series take it from there.

🔴 Never disable the DNS Client service as a fix. Some old forum advice suggests it. A PC without this service loses caching and can break name resolution in ways that look exactly like the disease you were treating. Automatic and running is the only healthy state.

🎥 Watch the Complete Fix Video

Watch the video for the commands run live — including what Windows replies when the service refuses to stop, and the reboot route that replaces it.

▶️ Watch Full Video
❓ Frequently Asked Questions

What is the DNS Client service and why does it matter?

It is the Windows service, named Dnscache, that resolves website names and caches the answers for every program on the PC. If it is stopped, misconfigured or holding a bad cached answer, browsers show errors like ERR_NAME_NOT_RESOLVED even on a healthy network.

Why is the Stop button greyed out for DNS Client?

On many recent Windows 10 and 11 builds Microsoft protects this service, so it cannot be stopped or restarted from the console or with net stop. That is normal behaviour for those builds. A full PC restart is the supported way to reset the service and its cache there.

Does flushing the DNS cache delete anything important?

No. The cache is only a memory of recent name lookups and it rebuilds itself automatically from live answers. Flushing removes good entries along with bad ones, which costs nothing but a first lookup that is a fraction slower. It is one of the safest repair commands in Windows.

This guide is based on the Technical Anshu ERR_NAME_NOT_RESOLVED fix video • Stuck on a step? Ask in the video comments — you will get a reply 🙏