38

How do you clear cached redirects in Chrome?

I changed the DNS for a domain name and when I go to mydomain.com. Even though ping mydomain.com now shows it resolves to the correct IP, if I type in "mydomain.com" into Chrome, it still redirects to mydomain.com/404, which was a redirect automatically setup by the old webhost.

Clearing Chrome's browser cache has no effect, and Chrome seems to ignore /etc/hosts. I tried using a "different" URL, like mydomain.com?123, but Chrome still redirects to mydomain.com/404. Is this a bug or is there someway to clear whatever cache Chrome uses to save 301 redirects?

1

9 Answers 9

25

The only method that worked from me is using Development tools an check on disable cache and the redirection were gone :)

reference

1
  • 5
    Yep! Only this worked for me. So to specify: 1. Open developer tools (F12) - 2. Go to Network tab - 3. Check the Disable cache checkbox - 4. Visit the site (it should work) - 5. Uncheck the Disable cache checkbox. - 6. Visit site again (should keep working)
    – Jules
    Commented Jan 17, 2020 at 15:05
23

On desktop Chrome, deleting the last hour of browsing history works, so long as you've followed the redirect within the last hour.

On Android Chrome, visit chrome://net-internals, click the downward arrow at the top right corner, and choose 'clear cache'. That is the only solution I found for Chrome on Android.

4
  • 4
    On desktop - chrome://net-internals approach does work also. Commented Apr 18, 2018 at 8:08
  • 1
    In OS X when modifying hosts file Chrome just keeps redirecting despite clearing everything; even thought chrome://net-internals. It even redirects when using private browsing tabs, so it is probably not your regular cache issue... Any ideas?
    – LyK
    Commented May 8, 2018 at 22:57
  • Seems to be a known Chrome issue. Some solutions are presented here: superuser.com/questions/648133/…
    – LyK
    Commented May 8, 2018 at 23:13
  • 2
    Unfortunately there is no "downward arrow" anywhere on mobile nor on desktop. Probabyl this feature was lost while the Events viewer and related functionality was removed. Now the default Events section says just The net-internals events viewer and related functionality has been removed. Please use chrome://net-export to save netlogs and the external netlog_viewer to view them. :(
    – Timo
    Commented Oct 4, 2023 at 8:18
10

Open the Chrome Developer Tools (F12) Go to the Network tab and make sure Disable cache is ticked Reload (or navigate to) the page you no longer want to be redirected while keeping the dev tools open. This will clear the cached redirect. enter image description here

1
  • 1
    Great trick, thanks! Commented Feb 24 at 17:07
9

I had a similar issue with a site still re-directing to my.site.com/new-site and found the 'clear cache' via internals to work.

Redirects can be caused by a variety of things - caching by your browser, your system, the network, the site configuration itself and any in between steps.

In addition to clearing browsing history and cookies, I also tried the answers from Clear cache for specific domain name in chrome - I suggest trying answers in order of increasing complexity (e.g. start with what you're happiest with and if that doesn't work, try one of the more tricky solutions)

From https://superuser.com/users/83619/tom-auger

After opening up the developer tools (usually by pressing F12) Click + Hold on the "Reload Page" button. From the popup list, choose "Empty Cache and Hard Reload".

From https://superuser.com/users/87608/euroblaze

Here's how to delete Chrome's cookies selectively by domain or subdomain:
* go to chrome://settings/content/cookies
* type the domain name in the search box
* click delete

1
  • 1
    +1 My issue was that http : //127.0.0.1:8000 was redirecting to https : //127.0.0.1:8000 which is obviously not what I wanted. I tried everything from deleting cookies to checking out chrome://net-internals but it didn't seem to work for me. What did work for me was bringing up the chrome dev tools, click+hold an then "Empty Cache and Hard Reload". Commented Jul 19, 2018 at 14:33
4

Go to chrome://net-internals/#dns and click the Clear Host Cache button

1
  • This did the trick for me and, also (to make this not just a "me too" comment), I think was the solution OP was looking for. Based on the prior steps taken.
    – John E
    Commented Jan 15, 2021 at 22:21
2

On chromium 88 chrome://settings/clearBrowserData

Check "Cached images and files" and click "Clear Data"

1
  • 1
    This is what worked for me. Clearing the data for a specific domain from Debugger -> Application -> Storage did not work.
    – Kevin C.
    Commented Feb 7 at 22:08
1

If it's an 301 redirect Chrome will cache it. To clear the cache, go to:

Chrome Menu > Settings > Show advanced settings... > Privacy > Click Clear browsing data...
2
  • which part shall one thick for the redirects? Commented Apr 4, 2017 at 19:30
  • And I've cleared my browser history and it didn't solve the issue, The link from search results pointed me to this comment, use most up voted answer instead that works just fine.
    – jcubic
    Commented Jun 24, 2018 at 11:49
1

Quick fix: open devtools via right-click on the page ➞ Inspect, or via keyboard shortcut CtrAlti, on mac i, and then click and hold the Refresh button in the chrome toolbar as shown below, and then pick in the dropdown Empty cache and hard reload — this way you won't lose your sessions and cookies as with other suggested methods.

chrome flush URL redirects

While this is usually used to clear cached resources, such as scripts, assets, images, it also works for clearing URL redirects.

0

If chrome has cached your redirect, it can be challenging to clear the cache, as the redirect happens very quickly. Try:

  1. Turn off your WiFi, then load the site. It won't load (but won't redirect).
  2. With WiFi off, long press the reload button
  3. Click Empty Cache and Hard Reset
  4. Turn on WiFi

That might do the trick!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .