Keyword-rich and SEO optimized URLs in ProductCart

There is a big debate on whether keyword-rich URLs help your search engine rankings (see some search results on this topic). They probably don't hurt. It's probably sensible to think that it is helpful to a search engine spider to see in the URL keywords that are related to the content on the page. It's one more confirmation that the page contains stuff that's related to those keywords.

Rewriting dynamic pages as static ones

To turn dynamic Web pages into static-looking, keyword-rich pages you need the help of your Web server. Generating the static pages as independent files is not feasible. It would require too much time and processing power, and things like inventory levels would not be updated in real-time.

Instead, what many Web sites do these days is to rely on “re-write” techniques to take a dynamic URL and turn into a static one, often using things like a product or category name as part of the page name. Unlike with the Apache Web server, there is no re-write capability built into a Windows Web server for Web sites that use Active Server Pages.

As a workaround, you have to options:

Creating Static Store Pages Using a Custom 404 Error Handler

Description

We believe that we have found a technique that will allow you to improve your search engine rankings, is easy to implement, does not require third-party software, does not require substantial code changes, and does not violate any Webmaster “best practices” (which is a crucial concern for us).

Using a custom 404 error handler - especially created for ProductCart-powered stores - your Web server will rewrite the URL of dynamic pages so that they look and behave like static .htm pages. If you are using ProductCart v3, the page URLs will also include the product and category names, thus becoming even more search engine friendly.

There are many ProductCart stores that use this technique, including the Early Impact software store. For example:

The ASP pages are presented to the browser as ”.htm” pages. These ”.htm” pages actually don't exist on the server. The user is “transferred” from the missing .htm page to the asp page “behind the scene” using a technique that takes advantage of the custom 404 error page.

We have done extensive research and believe that this technique does not violate any “best practices” because the custom 404 error handler will correctly report that a page does not exist (404 server response code), except for properly formatted product and category links (and these pages do exist, although they are ASP pages). There is a bit of extra server processing that happens when the URL is interpreted (the product or category ID are extracted from the URL). However, the amount of server processing should be negligible and have no effect on your store.

Instructions

These instructions and the accompanying files are provided “as is”. We do not offer technical support on the implementation of these changes to your ProductCart-powered store. In addition, while we have done extensive research on this technique and made every effort to ensure that it does not violate any best practices recommended by search engines such as Google & Yahoo!, we cannot make any promises regarding search engine placement for your particular site, or that search engine criteria will not change at some point in the future. You assume all risk and reward for implementing this technique on your own site.

Before You Start

Please carefully review this checklist before you start:

  • Applicability: Make sure to select files that are compatible with your version of ProductCart
  • Make sure you back up all files mentioned in this document.
  • Make sure you perform this update at a time when your store is not busy so that you have time to revert back to the previous configuration if the server behavior is not the expected one.

Your Web hosting company must allow you to:

  • Specify a custom 404 page
  • Specify that the 404 error is handled by a URL vs. a file. This is the Message Type property in IIS. If you don’t see this setting in your Web hosting account’s administration area, try performing the following steps anyway: in some scenarios this setting is detected automatically, according to our research.

If you have access to your own server:

  • Start IIS (Internet Information Services) from the Administrative Tools icon in the Windows Control Panel
  • Right-click on the Web site, and select Properties
  • On the Properties Window, click on the Custom Errors tab, scroll down to the 404 error, select it and click on Edit Properties.
  • On the dialog box that is displayed, change the Message Type to URL and enter the absolute path to the file 404.asp, which will be located in the productcart/pc folder, after you update the files that you received with this document. Click Apply, then OK.

Review header.asp

Your header.asp file must be using the dynamic meta tag generator (pc/include-metatags.asp). To make sure that this is the case, open the file “pc/header.asp” and make sure that it contains the following lines of code towards the top of the page:

<!--#include file="include-metatags.asp"-->
<html>
<head>
<%if pcv_PageName<>"" then%>
<title><%=pcv_PageName%></title>
<%end if%>
<%GenerateMetaTags()%>
<%Response.Buffer=True%>

If this is not the case, you will need to edit header.asp so that it uses the dynamic meta tag generator.

Installation

Carefully read this entire section before getting started. Do not perform the next task unless you have completed the previous one, or the system will not perform properly.

  1. Edit the file “pc/404b.asp”
    The file only contains 5 lines of code. Change the following line
    Server.Transfer("/404.html")

    so that ”/404.html” is replaced with your custom 404 error page located in the root of your Web site. If you don't have a custom 404 error page, you should create one. For example, here is the one that we use at Early Impact: http://www.earlyimpact.com/page_not_found.html

  2. Upload the files to the server
    1. Make sure that you have downloaded files compatible with your version of ProductCart
    2. Back up your existing files before proceeding
    3. Upload the additional files contained in the Apparel and Conflict Management folders if you are running those add-on's.
  3. Test the store
    Load the file viewcategories.asp in the pc folder. You should be browsing the store using static .htm pages.
  4. Check your server results code
    It is extremely important that your server correctly returns a 404 error code when a page that does not exist and which is not a ProductCart product or category page is loaded. Otherwise, your Web site will be in violation of Web master best practices, including best practices endorsed by Google, which could potentially penalize your Web site’s rankings. The code that we have developed correctly returns the right response codes. To confirm that your Web site is working properly:
    1. Try loading a page on your site that does not exist. The error code should be 404.
    2. Now try loading a ProductCart “htm” page, the error code should be 200.

Important Notes

  • Default Meta Tags
    Remember that you must replace your current version of the meta tag generator (pc/include-metatags.asp) with the one included with the ProductCart_SEO files. Make sure to replace the default meta tags with your own, or use file synchronization software to simply synchronize your version of the file with the new one.
  • Updating ProductCart
    If you are using an earlier version of ProductCart and/or you have customized the pages that are included with this document, compare the two files using file comparison software. The code changes used by this technique are quite small.
  • Control Panel features
    The Generate Links, Generate Store Map, Generate Sitemaps, Generate Google Base File, and Generate Yahoo! File features have been edited so that they generate correct links to the static store pages.
  • Content Pages
    If your header.asp uses the logic that generates a listing of the content pages, this article will allow you to alter that logic to provide SEO-friendly URLs for viewcontent.asp (applies to v3.51 and beyond).

Possible Performance Issues

Although we do not have any reports of any performance issues, there are some potential performance issues associated with this technique. First, it requires an extra database call to check the validity of the product or category ID used in the URL. Secondly, the server performs a number of additional tasks before delivering the page. If you experience performance issues, you might want to revert to using the standard ProductCart pages. If you do so, remember to change the reference to the custom 404 error page (revert back to the original 404.html).

Resources

The following articles have been used when creating the code that enables this feature, in case you are interested in reading more about it.

Files

If you are uploading the files after updating to a new version of ProductCart, make sure that you do not upload the file “404b.asp” in the “pc” folder. That file contains the name of your own 404 error page, which changes from Web site to Web site.

Note about Content Pages: keyword-rich URLs for content pages were introduced with version 3.51. If you are running a previous version, try downloading these files, which are based on this forum post, and these (rough) instructions. This information was submitted by a ProductCart reseller.

Sample stores


Personal Tools