Jump to content

Redirects


annie9129

Recommended Posts

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:

Example

RewriteRule 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!

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 .. 

 

Link to comment
Share on other sites

Hi

This 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 them

Ian

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Either 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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...