Skip to content
May 27, 2016 / kiranpatils

Looking for good 301 Redirect module for your Sitecore site?

Challenge:

Howdy friends, Sorry for being away for a while. But was busy with lot of things. I am back here to share my new Sitecore basics with you!

We have been revamping our site on newer Sitecore version. And we are near to launch. Site is already live and we have few sections/pages which are already indexed by Search engines and people might have already bookmarked it. But in new site those pages section has been changed or they have been moved. Sound similar? I guess most sites will have this challenge.

And as you would have done in this case. We also searched for good Sitecore 301 Redirect module. But I have been overwhelmed with lot of results, module and options. But to be honest, we were looking for simple solution which should do following things:

  1. Look for exact source URL and redirect it to either internal item or external URL
  2. Look for pattern and redirect to URL — Might want to preserve querystring

Simple?! You are also looking for same. Then this post is for you! Keep reading..

Solution:

After spending some time going through each module. This module took my attention : https://marketplace.sitecore.net/en/Modules/3/301_Redirect_module.aspx Because it looks simple, rating is high, and github is active!

We downloaded required package and installed it : https://github.com/thecadams/301RedirectModule

Now, you are all set!

  1. All redirects resides under: /sitecore/system/Modules/Redirect Module. So, If you have content authors role. Make sure they have access
  2. I faced some issue in my local with SC 8.1 Updated1 – Where for one of the item Response Status — Item’s version was not created. So, If you also face such issue. Please double-check each item and field have versions created
  3. There are two type of redirects :
    1. Redirect Url : Here you can provide Source URL and then where to redirect – You can redirect to Item or specific URL — We recommend Response Status Code as 301 – Moved Permanently. So, Search engines know that this page has been shifted to new URL. Mostly this will have one to one mapping. Example: When request comes from : http://localhost.SCBasics.com/demo.job-postings/job-detail?jid=16846 it should redirect to : http://localhost.SCBasics.com/job-search/job-detail?jid=16843
    2. Redirect Pattern: This can be used to group by URLs. When you have source URL request matching some pattern and you would like to redirect on particular item you can use this. As per below example any request coming from any URL having job-posting/job-detail (Pattern : ^/job-postings/job-detail(?<OptionalQueryString>\?.*)?$) in URL should be redirected to Job Detail page with QueyrString (/sitecore/content/SCBasics/Job Search/Job Detail${OptionalQueryString)
  4. For more examples please refer : https://github.com/thecadams/301RedirectModule#examples
  5. It also provides N number folder support. So, It is good practice to follow it!
  6. And If you have a lot of redirects and would like change how redirect item gets resolved (fast, query, api) or would like to change where this module looks for 301 Redirect items then have a look at : SharedSource.RedirectModule.config

That’s it!

Happy Redirection! 🙂

Advertisements

2 Comments

Leave a Comment
  1. shiva / Jul 30 2017 5:57 pm

    Hello,
    I have a question, I would like to redirect the page only when the item is no longer in use. Does this module checks whether is the page is unavailable?
    Example:
    If any page under job-details/any-page and this page is no longer in use, I want to it to redirect to job search page.

    Does this module handle this scenario?

    • kiranpatils / Aug 31 2017 11:45 pm

      I think so

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: