How to Fix DNS Cache Issues — Websites Not Loading or Redirecting Wrong on Windows
Websites loading wrong pages, getting redirected to suspicious sites, or some websites not resolving at all? Flush DNS cache and fix DNS issues on Windows 10 and 11.
📖
Main Troubleshooting Guide
How to Fix No Internet Connection →Complete symptoms, causes, and step-by-step solutions
Symptoms
You might be experiencing this problem if you notice:
- •Websites redirecting to wrong or suspicious pages
- •Some websites not loading while others work fine
- •"This site can't be reached" for sites that work on your phone
- •Browser shows old/cached version of a website
- •nslookup returns wrong IP address for a domain
- •Websites load correctly after clearing browser cache but break again later
- •Ping shows incorrect IP address for a known domain
Common Causes
- ⚠Stale entries in the Windows DNS resolver cache
- ⚠DNS cache poisoned by malware or malicious redirects
- ⚠Router DNS cache serving outdated records
- ⚠Hosts file modified to redirect domains
- ⚠ISP DNS server returning stale or incorrect records
- ⚠DNS client service not refreshing cache properly
- ⚠Browser DNS cache separate from system cache holding stale entries
Solutions
Solution 1: Flush Windows DNS Cache
- 1Open Command Prompt as Administrator
- 2Run: ipconfig /flushdns
- 3Should see: "Successfully flushed the DNS Resolver Cache"
- 4Verify cache is empty: ipconfig /displaydns | more (should show very few entries)
- 5Now try the problematic website again
- 6This is the most common and fastest fix for DNS cache issues
- 7The cache will rebuild automatically as you browse
Solution 2: Flush Browser DNS Cache
- 1Browsers maintain their own DNS cache separate from Windows:
- 2Chrome: navigate to chrome://net-internals/#dns → click "Clear host cache"
- 3Edge: navigate to edge://net-internals/#dns → click "Clear host cache"
- 4Firefox: about:networking#dns → click "Clear DNS Cache"
- 5Also clear browser cache: Ctrl+Shift+Delete → Cached images and files
- 6Close and reopen the browser
- 7Try the website again
Solution 3: Check and Clean Hosts File
- 1Malware sometimes adds entries to the hosts file to redirect websites:
- 2Open Notepad as Administrator
- 3File → Open → navigate to C:\Windows\System32\drivers\etc\hosts
- 4The file should only contain comment lines starting with #
- 5Any line like "1.2.3.4 google.com" redirects that domain — delete suspicious entries
- 6Save the file (may need to save to desktop first and copy back)
- 7If you can't edit it: take ownership first or boot into Safe Mode
Solution 4: Switch to Public DNS Servers
- 1Your ISP's DNS may be serving bad records:
- 2Settings → Network → your connection → Hardware properties → DNS server assignment → Edit
- 3Switch from Automatic to Manual
- 4Google DNS: 8.8.8.8 (Primary), 8.8.4.4 (Secondary)
- 5Cloudflare DNS: 1.1.1.1 (Primary), 1.0.0.1 (Secondary) — fastest
- 6Enable DNS over HTTPS for privacy: select "On (automatic template)"
- 7After changing: run ipconfig /flushdns again
FIXES THIS IN 5 MINUTES
Fix DNS Cache Issues — Websites Not Loading or Redirecting Wrong Automatically
RescuePC Toolkit includes 108+ automated repairs that fix this problem with one click. No command line knowledge required.
Download Now - Free TrialNo credit card required • Works on Windows 10 & 11