How to undo a 301 redirect?
Solution 1
Don't use 301 if the stuff hasn't moved permanently (forever!). This would be the proper solution.
The problem is that caching is done on the client side so you need to wait for that cache to timeout, then the client will again get the original page.
As far as I know this cannot be done in your situation from the server side.
As a workaround you could create a synonym for a.html (on your server, like ln -s a_foo.html a.html
) and redirect from b.html to a_foo.html
Solution 2
If your problematic redirect is only on HTTP, Change to HTTPS. Or change example.com to www.example.com, or the other way around.
Timo Huovinen
"The formulation of a problem is often more essential than its solution, which may be merely a matter of mathematical or experimental skill." -Albert Einstein Web Dev that enjoys HTML/CSS, but mainly works with JavaScript, Golang, PHP and SQL. Considers himself to be a beginner forever, even though has experience in the field, the fact that he is self-taught shows with constant beginner questions. Talks about himself in third person. Lacks common sense.
Updated on June 26, 2022Comments
-
Timo Huovinen almost 2 years
Now, I don't have any problems with 301 redirects, but one person asked me for the way to undo cached 301 redirects for browsers and search engines, so I replied "by doing a 301 redirect back to the original url", at least thats what I thought was the solution, until I saw people mentioning that you can't do a 301 redirect back http://getluky.net/2010/12/14/301-redirects-cannot-be-undon/ http://www.velocityreviews.com/forums/t500058-undo-301-redirect.html
this was a surprise and I don't know for sure if it's true, so what I'm asking is, what would be the proper way to revert a cached permanent 301 redirect from page /a.html to page /b.html back to the original /a.html ?
I would like some experts opinions.
-
starsinmypockets over 6 yearsNot doing something isn't a way to undo it.
-
Angelo Fuchs over 6 years@starsinmypockets Correct, that is why the third paragraph is "This can't be undone" and the forth is "This is a workaround".
-
TheCycoONE over 2 yearsI took over a domain, which now points to an entirely new site and their 302 on the root is poisoning it. I guess you are saying I have no recourse