annie9129 Posted June 24, 2015 Share Posted June 24, 2015 We have over 100 URLS featuring in google search results that are old URLs with incorrect paths. I am not sure why they still feature in the results, but it means a user will search for a product on google, two links from our site will be listed, one that works, and one that when clicked on results in an infinite redirect loop. Really don't know why or how .. Anyway, we want to just redirect all of these so I manually found all the incorrect ones and have create rewrite rules for each of them in the following format:ExampleRewriteRule website-page/product-1.html web-site-page/product-1.html [R=301,L]This seemed to work fine and all the bad urls featured in the search results were redirected to the updated url.However, when actually on the website, it caused internal link problems and redirect loops. Can anyone tell me what might have caused this?Thanks! Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted June 24, 2015 Share Posted June 24, 2015 I will tell you that I had asked our host for help with some similar redirect needs. They said a large number of redirects slows the site down. They suggested it would be better handled by creating an empty page named with the wrong url with a 301 redirect written as the content of the wrong file. I only had a few, so I just blocked the wrong ones from Google Webmaster Tools and forgot about it. But if you have that many to fix, this suggestion might be helpful to you. Quote Link to comment Share on other sites More sharing options...
annie9129 Posted June 24, 2015 Author Share Posted June 24, 2015 Thanks Dirty Butter!That sounds like an interesting solution, but i am not sure i understand you correctly! Please could you explain a little further? Do you mean that I could create say a hidden site document page with the same url as the wrong one - then redirect that page? I am sure I havent understood right, as this would still mean creating all the rewrite rules .. Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted June 24, 2015 Share Posted June 24, 2015 I haven't actually done it, as it was overkill for my couple of wrong url files. But as I understand it you create a file via ftp or cpanel (not a document), named wrong.url and the only content in that file would be the redirect to the correct url. Quote Link to comment Share on other sites More sharing options...
annie9129 Posted June 24, 2015 Author Share Posted June 24, 2015 Ah, got it! Thanks for the help, and will look into this Quote Link to comment Share on other sites More sharing options...
havenswift-hosting Posted June 24, 2015 Share Posted June 24, 2015 HiThis is simply continuing with an issue rather than fixing it and in a complicated way that potentially needs maintaining over time. 100 redirects is not excessive and while it would slow the site down a little it would not be that noticeable. If those old urls are indexed and have some link juice then creating 301 redirects on a temporary basis while ensuring that they are removed from your sitemap and from any websites that reference them (including your own) is the best way to deal with this. Google will very quickly drop these old urls if they dont actually exist any longer and if not that isnt quick enough, then you can simply use a robots.txt and Google Webmasters tools to tell Google to forget and remove themIan Quote Link to comment Share on other sites More sharing options...
annie9129 Posted June 24, 2015 Author Share Posted June 24, 2015 Thanks Ian, That is the solution that was recomended by our developer, which we went ahead with initially, however for some reason it made internal links on the site that had been working perfectly, suddenly start returning redirect loops. After looking through the list of rewriterules that were added to the htaccess, all the urls we put in were correct etc so i dont know why it caused such issues Quote Link to comment Share on other sites More sharing options...
havenswift-hosting Posted June 24, 2015 Share Posted June 24, 2015 That is the solution that was recomended by our developer, which we went ahead with initially, however for some reason it made internal links on the site that had been working perfectly, suddenly start returning redirect loops. After looking through the list of rewriterules that were added to the htaccess, all the urls we put in were correct etc so i dont know why it caused such issuesEither the redirect rules were not written correctly or were not added to the .htaccess file in the correct place - did you add them manually or through cPanel ? cPanel will always add directives like this at the end and that is usually not correct. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.