Monday, July 10, 2006

How to remove session ID appended URLs from the search engine index

A common scenario is for store owners that were not aware of the "Prevent Spider Sessions" option to have several URLs indexed by spiders with the session ID appended. This situation is troublesome and there are a few options to handle referrals sent through the "wild" session ID URL.

However, the true solution to the problem is to REMOVE THE SESSION ID's from the search engine index! So, how hard is it? Pretty easy!

In includes/application_top.php find this code:

Under that paste this code:

This code will redirect the spider to the non-SID URL with a 301 header and over time will remove the session appended URL from the index.