Preventing Duplicate Content on an E-Commerce Site from Session IDs - Oscommerce Admin Configuration
(Page 3 of 4 )
Oscommerce admin configuration includes a very useful feature called “Prevent Spider Sessions.” This feature works like this:
- Googlebot visits the website URL containing a session ID.
- The server will do the Apache mod rewrite then automatically 301 redirect URLs with session ID pointing to the canonical URL, so if Googlebot found this one:
http:// www.yoursite.com/osc/specials.php?osCsid=cd5627128b63b13553aea5b6c2b3d65c
The server will do a server side 301 redirect to http://www.yoursite.com/osc/specials.php . Therefore, instead of Googebot indexing URLs containing session IDs, they will crawl and index the canonical version (without a session ID).
This should be set up at the earliest stage of the website's development. This is ideally done before allowing Googlebot to crawl the website's pages.
To implement this solution, do the following:
- Log into your website oscommerce admin panel.
- Under Administration, you can find “Configuration.”
- Under “Configuration,” you can find “Sessions.”
- In “Sessions,” find one with “Prevent Spider Sessions” and click “Edit.”
- In one of the Edit options, click “True” and click “Update.”
After editing, it should like the screen shot below:
To see the list of allowed spiders, navigate through /osc/includes , and find the spiders.txt file. Be careful about editing this, and always do a backup.
This is an excellent corrective action in the early stage of your site, when Googlebot has still not indexed it. Indeed, it is better to take this action than the one discussed in the previous section.
However, if Googebot has already started indexing your site, along with the ugly session IDs, this solution can create duplicate content issues, because Googlebot will now index the canonical URLs, too. This will create content that duplicates what Google found at the already-indexed URLs with session IDs.
To fix this issue permanently requires another corrective action, which I'll discuss in the next section.
Next: The Link Rel Canonical Solution >>
More Search Optimization Articles
More By Codex-M