SharePoint 2007 – Page Redirection / Bad Links Solution

Recently I was faced with this customer situation: “Replace my existing web site with a SharePoint 2007 site AND handle all the existing links to my site gracefully”.   Basically the customer asked me to build them a new public facing web site and asked that their existing page links (those in search engines, other web sites and links saved by their customers) continue to work and don’t become “dead” links.

I’ve heard this request when building Intranet sites and Extranet sites, but it’s probably most important when SharePoint 2007 replaces an existing Internet site because you have less control and contact with the audience.  With Intranet and Extranet sites you often have the ability to notify site users that the links to their sites and documents may be broken and you may even provide documentation and training on how to deal with the new site taxonomy.  With Internet sites you don’t have the same relationship with your users (customers) so your SharePoint 2007 site often has to handle the old links gracefully. 

With public facing sites you often reply upon search engines (Google, Live Search, Yahoo, etc) to find your site and you want to be sure that the stale links in those search engines do not lead to dead ends.  Most search engines today provide webmaster tools that allow you to remove dead links and provide updates site maps.  See my article on site maps for SharePoint.   Below are links to the three most popular search engine webmaster tools:

There are two basic approaches for solving the page redirection and bad link issues; 1.  Translate the http requests before they reach the site, or 2. Make the site “smart” so that it can redirect the http requests to the appropriate destination.

Things to consider before you begin building a solution:

1.  Identify all potential inbound links to your site and document those (I recommend creating a SharePoint list or spreadsheet).  Be sure to visit all major search engines to see what pages are indexed by those search engines, those links should be included in your list.

2.  Determine if your inbound links use query string parameters; for example: a link like http://www.kroger.com/privacypolicy.htm does not use query string parameters where a link like http://www.kroger.com/page.asp?tabid=143 does use query string parameters.  This will depend heavily on the technology used to implement the site you are replacing and may impact your choice on solutions.

3.  Identify the tools at your disposal; For example; is there a hardware-based firewall, a software-based firewall, load balancing software, load balancing hardware.  It is often easier to leverage one of these tools for page redirection rather than going down the custom programming path.

Solutions for handling page redirection include the following:

1.  Firewall or Load Balancing – Configure your firewall to “listen” for the set of inbound links and have your firewall redirect the request to the desired destination page.  If you are using Microsoft ISA Server you can enable Link Translation to handle the transition to the new addresses.  Other firewalls and load balancing solutions provide similar functionality to ISA, so be sure to check with your vendor.

2.  Custom Redirection Page – Implement a custom ASP.NET page inside SharePoint to handle all 404 errors.  

3.  Use the Codeplex Smart 404 Feature created by Josh Carlisle.  This is the solution I’ve used the most and I’ve found it very effective. 

In my next post I will guide you through the use of the Smart 404 Feature and provide you some sample code for extending the functionality of that feature.

Leave a comment