Wednesday, August 1, 2018

redirect - What is the best approach for redirection of old pages in Jekyll and GitHub Pages?

Answer


Answer




I have blog on github pages - jekyll



What is the best way to solve url strategy migration?



I found the best practice in common is create htaccess like so




Redirect 301 /programovani/2010/04/git-co-to-je-a-co-s-tim/ /2010/04/05/git-co-to-je-a-co-s-tim.html


But it does not seems to work with Github. Another solution i found is create rake task, which will generate redirection pages. But since it's an html, it's not able to send 301 head, so SE crawlers will not recognize it as an redirection.


Answer



The best solution is to use both and



It works very well, Google Bot reindexed my entire website under new links without losing positions. Also the users are redirected to the new posts right away.








Using will redirect each visitor to the new post.
As for Google Bot, it treats as 301 redirect, the effect is that you get your pages reindexed and that is what you want.



I described whole process how I moved my blog from Wordpress to Octopress here.
http://konradpodgorski.com/blog/2013/10/21/how-i-migrated-my-blog-from-wordpress-to-octopress/#redirect-301-on-github-pages


No comments:

Post a Comment

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...