User Agents

Web browsers and everyday web tech, explained

How to Clear IPConfig Cache and Flush DNS on Windows

· 5 min read · Cookies and Cache

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Clearing the IPConfig cache, more accurately known as flushing the DNS resolver cache, removes outdated or incorrect IP address mappings from your computer's local memory. This process forces your system to request fresh DNS records from the server the next time you visit a website, which often resolves "Page Not Found" errors, connection timeouts, and issues resulting from recent website migrations or server changes.

What You'll Need

  • A computer running a Windows operating system (Windows 10, 11, or earlier versions).
  • Administrative privileges on the user account to execute system-level commands.
  • An active internet connection (to test the results after the flush).

Step-by-Step

  1. Open the Start Menu: Click the Start button in the bottom-left corner of your screen or press the Windows key on your keyboard.
  2. Search for Command Prompt: Type "cmd" or "Command Prompt" into the search bar.
  3. Run as Administrator: Right-click on the "Command Prompt" application in the search results and select "Run as administrator." This is a critical step; if you run the prompt as a standard user, the system will deny the request to clear the cache for security reasons.
  4. Confirm User Account Control: If a User Account Control (UAC) window appears asking if you want to allow this app to make changes to your device, click "Yes."
  5. Enter the Flush Command: In the black Command Prompt window, type the following command exactly as shown: ipconfig /flushdns
  6. Execute the Command: Press the Enter key on your keyboard.
  7. Verify Success: Look for the confirmation message: "Successfully flushed the DNS Resolver Cache." If you see this message, the process is complete.
  8. Close the Prompt: You can now close the Command Prompt window by clicking the "X" in the top-right corner or by typing exit and pressing Enter.

Common Mistakes

  • Forgetting Administrator Rights: The most frequent error is opening the Command Prompt without administrative privileges. This results in an "Access is denied" or "The requested operation requires elevation" error message.
  • Typo in the Command: Users often forget the forward slash (/) before "flushdns" or add a space between the slash and the word. The command must be ipconfig /flushdns with a space after ipconfig but no space after the slash.
  • Confusing DNS with IP Reset: Flushing the DNS cache only clears the name-to-IP mapping. It does not reset your actual IP address or fix hardware-level connection issues.
  • Closing the Window Too Fast: Some users close the window before reading the confirmation message, leaving them unsure if the command actually executed.

Tips

  • Combine with Browser Cache Clear: If you are still seeing an old version of a website after flushing the DNS, clear your web browser's cache (Ctrl+Shift+Delete in most browsers). Browsers often store their own version of site data independently of the Windows DNS cache.
  • Use PowerShell: If you prefer PowerShell over Command Prompt, the ipconfig /flushdns command works exactly the same way in a PowerShell window run as administrator.
  • Check Your Connection First: Before flushing the DNS, try pinging a known stable IP address (like 8.8.8.8) to ensure your physical connection is active. If you can't ping an IP, the problem is your network, not the DNS cache.
  • Restart Your Browser: After flushing the cache, fully close and restart your browser to ensure it picks up the new DNS records immediately.

Troubleshooting

If the command does not resolve your connection issues or returns an error, try the following steps:

  • "Request for elevation" Error: This means you are not in Administrator mode. Close the window, right-click Command Prompt, and select "Run as administrator."
  • DNS Still Not Updating: If the site still won't load, your Internet Service Provider (ISP) may have a cached version of the DNS record on their end. This is called "DNS Propagation" and can take anywhere from a few minutes to 48 hours to update globally.
  • Reset the TCP/IP Stack: If flushing the DNS didn't work, you can try a deeper reset. In the Administrator Command Prompt, type netsh int ip reset and press Enter. You will need to restart your computer after this command.
  • Renew Your IP Address: Sometimes the issue is the local IP assignment. Type ipconfig /release (Enter), then ipconfig /renew (Enter) to get a fresh IP address from your router.

Frequently Asked Questions

Will flushing the DNS cache delete my passwords or history?

No. Flushing the DNS cache only removes the temporary list of IP addresses associated with domain names. It does not affect your browser history, saved passwords, cookies, or personal files.

Is it safe to flush the DNS cache frequently?

Yes, it is completely safe. There are no negative side effects to flushing the cache, other than a very slight delay the first time you visit a website immediately after the flush, as the computer must look up the IP address again.

How often should I clear my IPConfig cache?

There is no need to do this on a schedule. You should only clear the DNS cache when you are experiencing connectivity issues, "site not found" errors, or when you know a website has moved to a new server.

Does this work on Mac or Linux?

The ipconfig command is specific to Windows. macOS and Linux use different commands (such as sudo dscacheutil -flushcache on Mac) to achieve the same result.

Why do I need to do this if I have a fast internet connection?

Internet speed refers to how fast data travels, but DNS is like a phonebook. If the phonebook has the wrong number (IP address) for a business (website), it doesn't matter how fast your connection is; you will never reach the destination.