When you type a web address like google.com into your browser, your computer uses the Domain Name System (DNS) to translate that human-readable name into a machine-readable IP address. To speed up your web browsing, Windows 11 saves a local copy of these translations in a hidden file called the DNS Cache.
Most of the time, this cache works perfectly. However, if a website recently moved to a new server (and thus a new IP address), your outdated local cache will prevent you from accessing it. You might see a “Site cannot be reached” error, even though the website works fine on your phone. To fix this, you must flush the DNS cache.
What Does Flushing the DNS Do?
Flushing the DNS cache forces Windows to delete all its saved IP address translations. It does not delete your browsing history, cookies, or saved passwords. It simply means that the next time you visit a website, Windows will have to ask your Internet Service Provider for the fresh, up-to-date IP address instead of relying on its outdated local memory.
Method 1: Flush DNS via the Command Prompt
The fastest and most reliable way to clear the DNS cache is by using a simple terminal command. This method has worked identically across every version of Windows for the last two decades.
- Click the Start button on your taskbar.
- Type
cmdinto the search bar. - The Command Prompt app will appear in the results. Click it to open the terminal window. (You do not need to run it as an administrator for this specific command).
- In the black terminal window, type the following command exactly as written, with no spaces in the second word:
ipconfig /flushdns - Press the Enter key.
- Within a second, the terminal will output a success message: “Successfully flushed the DNS Resolver Cache.”
- You can now close the Command Prompt window.
Method 2: Flush DNS via Windows PowerShell
If you prefer using the modern Windows PowerShell or the new Windows Terminal app instead of the legacy Command Prompt, the steps are very similar, though the command itself is different.
- Right-click the Start button on your taskbar.
- Select Terminal or Windows PowerShell from the Power User menu.
- Type the following command into the blue (or black) terminal window:
Clear-DnsClientCache - Press the Enter key.
Unlike the Command Prompt method, PowerShell will not output a confirmation message. It will simply drop you down to a new, empty command line. This silent response means the command was executed successfully.
What to Do if Flushing Does Not Work
If you flushed your DNS cache and you still cannot access the website, the problem might be your web browser’s internal cache. Google Chrome and Microsoft Edge maintain their own separate DNS caches that sometimes ignore the Windows system cache.
To clear Chrome’s internal cache:
- Open Google Chrome.
- Type
chrome://net-internals/#dnsdirectly into the address bar and press Enter. - Click the button labeled Clear host cache.
After clearing both the Windows cache and the browser cache, any stubborn network routing issues should be completely resolved.