Table of Contents

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.

The instructions listed below 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.

Instructions

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.

ProductCart v4

You only need to follow the “Prepare your Web server” step on this page. That's because everything else is built into ProductCart v4 and above.

Once you have “prepared the server” (next step), turn the feature on in the ProductCart Control Panel under Settings > Store Settings > Miscellaneous. ProductCart will not allow you to turn the feature on until you have properly configured the server.

ProductCart v3

You will need to follow all of the steps below.

Please note the following before you start:

Prepare your Web server

Shared hosting or managed hosting

Your Web hosting account must allow you to:

  1. Specify a custom 404 page
  2. 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.
  3. Enter the full physical path to the file
Dedicated server

If you have access to your own server:

IIS 6

IIS 7


Installation: ProductCart v4

If you are using ProductCart v4, there is nothing to install as this feature is “built in”. You just need to turn it on and configure it properly. To do so, log into your Control Panel and follow these steps:

  1. Select Settings > Store Settings > Miscellaneous
  2. Set Use Keyword-rich URLs to “Yes”. Please note:
    1. ProductCart will not allow you to turn the feature on until you have properly configured the server to support this feature (see section above on how to prepare the Web server).
    2. We have heard of cases in which ProductCart was not able to successfully determine whether the server could support the feature. That is: the server was properly setup, yet ProductCart would fail to detect it. In this scenario, make a small code edit to the file “AdminSettings.asp” located in the Control Panel folder to get around the issue.
      1. Download the file and make a backup copy of it.
      2. Open it in Notepad or your favorite HTML editor.
      3. Locate the code:
        Set xml = Nothing
        If strStatus="200" then %>

      4. Replace it with:

        Set xml = Nothing
        strStatus="200"
        If strStatus="200" then %>

      5. Save the file and upload it back to the Control Panel folder.
  3. Enter the physical path to your custom error page. For example: ”/myErrorPage.html” (in this example the page is an html file called “myErrorPage.html” and located in the root of the Web site). If you don't have a custom error page, it's a good idea to create a friendly custom error page. It can just be a simple HTML file with some links to useful sections of your Web site (e.g. a link to the site map).

Installation: ProductCart v3

If you are using ProductCart v3, carefully review the rest of this page.

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

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

We recommend that you update to version 3.51.

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

There are many ProductCart-powered e-commerce Web sites that use this technique. Among them:

… and many, many others. Of course - our own e-commerce software store is one of them.