
Your computer caches DNS lookups so it does not have to ask for the same website address over and over. That is normally helpful, but it can keep using an old address after a site moves or a DNS problem is fixed.
Does this affect you?
Use this if a website will not load, shows the wrong server, keeps redirecting incorrectly, or still points to an old address after a DNS change. This clears the operating system DNS cache on Windows 10, Windows 11, and macOS.
Flush DNS on Windows
Command Prompt has the built-in tool.
- Click Start and type Command Prompt.
- Open Command Prompt. Administrator mode is not normally required for this command.
- Type ipconfig /flushdns and press Enter.
- Look for the confirmation that the DNS Resolver Cache was successfully flushed.
- Close and reopen the affected browser tab, then test the site again.
Flush DNS on Mac
Terminal handles the macOS DNS cache.
- Open Terminal from Spotlight or Applications > Utilities.
- Type sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder and press Enter.
- Enter your Mac login password when prompted. Terminal does not show characters while you type.
- Do not worry if there is no success message. That is normal.
- Reload the site that was failing.
More control
Browsers may cache DNS separately
Chrome, Firefox, and Edge can keep their own internal DNS cache. If only one browser has the issue, clear that browser DNS cache or restart the browser.
Routers can cache DNS too
If flushing the computer does not help, restart the router. Many routers cache lookups for the whole home network.
A bad DNS provider needs a different fix
If lookups fail repeatedly, switch DNS servers to Cloudflare, Google, or another reliable resolver. Flushing only clears stored answers; it does not change where new answers come from.
It does not erase personal browser data
A DNS flush does not delete cookies, saved passwords, browsing history, bookmarks, or downloaded files. It is safe to run during troubleshooting.
Sources
- Microsoft Support – Flush and reset the DNS client resolver cache (2025)
- Apple Support – Use Terminal to flush the DNS cache on Mac (2025)
- Cloudflare Learning Center – What Is DNS Caching? (2025)
