wyona / yanel

http://www.yanel.org
Apache License 2.0
10 stars 5 forks source link

Use 301 instead of 307 for redirects #75

Closed baszero closed 8 years ago

baszero commented 8 years ago

This is a very important fix for redirects with respect to SEO. According to many internet guidelines a redirect must be a 301 in order to retain the link juice. Link Juice: URL A redirects to B. If you built up A for years and have a very high Page Rank, B will inherit the same page rank if you do a 301 redirect. If you perform a 302 or 307 (current Yanel impl), the ranking of page B starts at zero (which we want to avoid in any case!).

I had this patch since 2012 in our yanel based software but during my upgrade I thought that this should go into the official Yanel too!

References: https://moz.com/learn/seo/redirection https://support.google.com/webmasters/answer/93633?hl=en

baszero commented 8 years ago

Please do not copy paste code changes from pull requests into the master branch. You should rather use the pull request, adapt it and then switch to master branch and say git merge balzpatch1, that way git will keep the full history and make it clear where the changes came from... and also the contributors will be visible.

See 2860d1162f82d13f215d4f8b25d74625e64bfcdd