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.ru → 93.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_NXDOMAINorERR_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:
- You have administrator privileges — the command requires elevated permissions.
- You are using Windows 10, 11, or Server 2019/2022 — these instructions are current for these versions.
- 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):
- Press the Win key or open the Start menu.
- Type
cmdorpowershell. - In the search results, click "Run as administrator" (or press Ctrl+Shift+Enter).
Method B (via Run):
- Press Win+R.
- Type
cmd(for Command Prompt) orpowershell(for PowerShell). - Press Ctrl+Shift+Enter instead of just Enter.
- 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:
- Close all browser windows (Chrome, Firefox, Edge, etc.).
- Restart applications that use the network (messengers, games, email clients).
- Try opening the problematic site again.
Verifying the Result
How can you be sure the cache was actually cleared?
- Repeat the
ipconfig /flushdnscommand — if it reports success again, the cache was reset (flushing an already empty cache also reports "success"). - Check site accessibility — open the site that previously wouldn't load. If it works now, the problem is solved.
- Use the
nslookuputility (optional):
In the same terminal window, run:
In the output, look for the linenslookup fixpedia.ruNon-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:
- Press Win+R, type
services.msc, and press Enter. - Find the DNS Client (Dnscache) service in the list.
- If its status is "Stopped", right-click → "Start".
- To have it start automatically at boot: right-click → "Properties", set "Startup type" to "Automatic", click "Apply" → "OK".
- 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\hostscontains 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:
- Check if the file exists at
C:\Windows\System32\ipconfig.exe. - If it's missing, run the System File Checker from an administrator terminal:
sfc /scannow