Thursday, October 01, 2009

MOSS for Internet and 301 Redirects


We've been using MOSS for our public Internet site for SharePoint Solutions for almost a year now. We have a very broad range of products and services, and therefore our site is what I would categorize as "moderately" complex. It takes work every day to keep all of the content fresh, do a good job marketing our products and services, and enhance usability. If you are reading this and your title is Webmaster and that is your full-time job, you know exactly what I am talking about (regardless of whether you are using MOSS or Drupal or something else).

As you may know, MOSS 2007 is version 1 of the web content management features of SharePoint that really make SharePoint a viable platform for a public-facing Internet site. Microsoft had a previous product designed for this purpose, Microsoft Content Management Server, which was retired with the release of MOSS 2007.

We like MOSS 2007 as a content management platform for a public Internet site, but the fact that it is a version 1 product continues to be evident to us every day.

One example is its inability to natively handle 301 redirects. This may sound like something that is no big deal, but it is a very big deal if you are using MOSS for a public Internet site and care about searching engine optimization (SEO).

The reason is that if you change the URL to an existing page on your site, the major search engines (Google, Bing, Yahoo) will still have your existing page in their indexes and will therefore still display your old URL in their listings until they find and index the new page. If you want them to find the new page and index it properly, the best practice way to do this is by creating a 301 redirect from the old URL to the new URL. This tells the search crawler that you have replaced Page A with Page B and that you would like for it to do the same in its index.

It is critical that the redirect is a type 301, not a type 302. A 301 is a "permanent" redirect, while a type 302 is a "temporary" redirect. According to the experts on search engine optimization (SEO), the search engines honor 301 redirects and will update their indexes accordingly, but they do not honor 302 redirects.

Getting back to MOSS and 301 redirects - there is no way to natively redirect one page in MOSS to another page and return a 301 permanent redirect status to the requestor (be it a human or a bot). Several people have offered up custom developed code to do this, but there is no consensus on whether any of these is really a good solution or not. Even if one of them is, it is still a hack to native MOSS to get a feature that really needs to be supported out-of-the-box in some user-friendly way because changing URLs is something that the average content manager is going to need to do quickly and easily from time to time over the life of a web site.

Interestingly, MOSS does offer a native and easy way to achieve a 302 temporary redirect. If you are using the Publishing Sites feature (which is what most MOSS public Internet sites use), you can enable a "Redirect Page" content type in your publishing pages libraries. This is an out-of-the-box content type, that will allow you to create a page that has a property that allows you to enter a URL to redirect to. From a live visitor standpoint, this certainly gives you a way to easily redirect from an old page to a new page. But, from a search bot standpoint, it doesn't do anything for you at all.

So, what is the solution? Well, first, I am hoping that something has been added to SharePoint 2010 to allow a content manager to create a 301 redirect from the user interface. Guess I need to add that to our list of what the community is hoping will be in SharePoint 2010.

In the meantime, the two different categories of solutions that I have been able to find are:
  1. Use custom code to enhance your MOSS for Internet implementation to be able to return 301 redirects (here is one example), or
  2. Use "URL re-writing" technology with IIS to accomplish this (for IIS6 here is an example, for IIS7 there is now native capability to do this). This technology will allow you to set up a map of old URLs to new URLs and then it will return 301 permanent redirects to requestors.
In my mind, neither of these is a great solution given the fact that the whole idea behind a web content management system is to put the power to maintain the website in the hands of non-technical content authors and content managers. Option 1 requires programming, which these folks can't do. Option 2 requires access to the web front-ends and configuration of IIS-related settings, which these folks probably can't do and even if they could would not be given access too.

So, really what is needed here is an out-of-the-box feature to support page-level 301 redirects. Will it be in SharePoint 2010?.........................

No comments: