Windows

Clearing the DNS Cache in Windows: A Quick Fix for Network Issues

Clearing the DNS cache removes outdated domain records, helping to resolve website access issues and speed up connections. In this guide, you'll learn how to quickly flush the DNS cache in Windows.

Updated at February 15, 2026
5-10 minutes
Easy
FixPedia Team
Применимо к:Windows 10Windows 11Windows Server 2019Windows Server 2022

Introduction / Why This is Needed

The DNS cache (DNS resolution cache) is a temporary storage on your computer where records are kept about which IP address corresponds to a domain name (e.g., fixpedia.ru93.184.216.34). Over time, these records can become outdated (if a site changed hosting) or contain errors. This leads to problems:

  • Sites don't open, even though they are available to others.
  • Errors like DNS_PROBE_FINISHED_NXDOMAIN or ERR_NAME_NOT_RESOLVED.
  • Slow page loading after changing DNS servers.

Flushing (resetting) the DNS cache forces Windows to request up-to-date DNS records from the servers. This is a simple and safe procedure that solves many network issues without changing any settings.

Requirements / Preparation

Before you begin, ensure:

  1. You have administrator privileges — the command requires elevated permissions.
  2. You are using Windows 10, 11, or Server 2019/2022 — these instructions are current for these versions.
  3. Your internet connection is physically active — if there's no link to the router, flushing won't help.

💡 Tip: If you're unsure about having administrator rights, check: in the Start menu, search for "Command Prompt" or "PowerShell" — there should be a shield icon next to them or the text "Run as administrator".

Step-by-Step Instructions

Step 1: Launch Command Prompt or PowerShell as Administrator

There are two main ways to do this:

Method A (via Start Menu):

  1. Press the Win key or open the Start menu.
  2. Type cmd or powershell.
  3. In the search results, click "Run as administrator" (or press Ctrl+Shift+Enter).

Method B (via Run):

  1. Press Win+R.
  2. Type cmd (for Command Prompt) or powershell (for PowerShell).
  3. Press Ctrl+Shift+Enter instead of just Enter.
  4. Confirm the UAC (User Account Control) prompt by clicking "Yes".

A black (CMD) or blue (PowerShell) window will open with the title "Administrator: ...".

Step 2: Execute the DNS Cache Flush Command

In the open window, type the following command:

ipconfig /flushdns

Press Enter.

What happens:
The ipconfig command is a Windows utility for managing network settings. The /flushdns parameter tells it to clear (reset) the local DNS cache.

Expected result:
You will see the line:

Successfully flushed the DNS Resolver Cache.

If you see the message "Could not flush the DNS cache. The DNS Client service may not be running" — proceed to the Potential Issues section.

Step 3: Restart Your Browser or Network Applications

Changes take effect immediately, but some applications (especially browsers) may maintain their own DNS cache. To be sure:

  1. Close all browser windows (Chrome, Firefox, Edge, etc.).
  2. Restart applications that use the network (messengers, games, email clients).
  3. Try opening the problematic site again.

Verifying the Result

How can you be sure the cache was actually cleared?

  1. Repeat the ipconfig /flushdns command — if it reports success again, the cache was reset (flushing an already empty cache also reports "success").
  2. Check site accessibility — open the site that previously wouldn't load. If it works now, the problem is solved.
  3. Use the nslookup utility (optional):
    In the same terminal window, run:
    nslookup fixpedia.ru
    
    In the output, look for the line Non-authoritative answer: — this means the response came from a cache, not an authoritative server. After clearing the cache, the first query will go directly to the DNS server, and the response time may increase slightly (which is normal).

Potential Issues

Error: "Could not flush the DNS cache. The DNS Client service may not be running"

Cause: The DNS Client service (Dnscache) is stopped or disabled.

Solution:

  1. Press Win+R, type services.msc, and press Enter.
  2. Find the DNS Client (Dnscache) service in the list.
  3. If its status is "Stopped", right-click → "Start".
  4. To have it start automatically at boot: right-click → "Properties", set "Startup type" to "Automatic", click "Apply" → "OK".
  5. Return to the Command Prompt and repeat ipconfig /flushdns.

Error: "Administrator privileges required" or "Access is denied"

Cause: The terminal was not launched with administrator rights.

Solution: Close the window and launch CMD/PowerShell as administrator (see Step 1).

Problem Persists After Flushing

Possible causes and actions:

  • Check your physical connection — is Ethernet/Wi-Fi working? Reboot your router.
  • Change your DNS servers — use public DNS from Google (8.8.8.8, 8.8.4.4) or Cloudflare (1.1.1.1). Instructions: Control Panel → Network and Internet → Network and Sharing Center → Change adapter settings → Right-click on active connection → Properties → Internet Protocol Version 4 (TCP/IPv4) → Use the following DNS server addresses.
  • Temporarily disable your antivirus/firewall — they may be blocking DNS queries.
  • Check the hosts file — if C:\Windows\System32\drivers\etc\hosts contains entries redirecting a site to a wrong IP, they take precedence over DNS. Edit the file as an administrator (remove unwanted lines) or rename it.

ipconfig command not found

Cause: The system cannot find the ipconfig.exe executable (an extremely rare case, possible with corrupted system files).

Solution:

  1. Check if the file exists at C:\Windows\System32\ipconfig.exe.
  2. If it's missing, run the System File Checker from an administrator terminal:
    sfc /scannow
    

F.A.Q.

When should you clear the DNS cache?
Does clearing the DNS cache delete personal data?
Can you clear the DNS cache without administrator rights?
What to do if the command doesn't work or returns an error?

Hints

Open Command Prompt or PowerShell as Administrator
Execute the DNS cache flush command
Restart your browser or network applications
FixPedia

Free encyclopedia for fixing errors. Step-by-step guides for Windows, Linux, macOS and more.

© 2026 FixPedia. All materials are available for free.

Made with for the community