Announcement:Materials and articles for ProductCart 5 can be found at our brand new support center.

Create an account to edit articles | See Formatting Syntax for Wiki syntax | We look forward to your contribution!

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 two options:

Creating Static Store Pages Using a Custom 404 Error Handler


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 ProductCart 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.


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"-->
<%if pcv_PageName<>"" then%>
<%end if%>

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:

  • 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.

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:


  • 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 is located in the productcart/pc folder. For example: ”/store/pc/404.asp” (here the “productcart” folder has been renamed “store” and is located in the Web site root).
  • Click Apply, then OK.

IIS 7 and 7.5

  • Start IIS and load your Web site
  • Now left-click on the folder and click on “Error Pages” in the Web store home
    IIS 7.5 Home screen
  • Select “Open Feature” in the right column
  • Double-click on “404”
  • Check the radio button “Execute URL on this site”
  • As the URL, enter “/store/pc/404.asp” (here the “productcart” folder has been renamed “store” and is located in the Web site root).
  • Click OK
  • Click on “Edit Feature Settings” in the right column
  • Select the first radio button (“Custom error pages”)
  • Click OK
  • Finally, you need to change the default setting “Send Errors to browser” for Classic ASP from: “False” to: “True”.

At Rackspace, you will need to use a “web.config” file to accomplish this. Here is a FAQ on this:

… so your “web.config” should contain the following:

         <httpErrors errorMode="DetailedLocalOnly">
            <remove statusCode="404" subStatusCode="-1" />
            <error statusCode="404" prefixLanguageFilePath="" path="/productcart/pc/404.asp" responseMode="ExecuteURL" />
Multiple stores on the same domain

If you have multiple ProductCart-powered stores running on the same domain, you can still use the Keyword-rich URLs, but you must remember that the error handler must be specified separately for each store. Otherwise, it will not work properly (it will also point back to pages that are hosted within the first of the stores that you setup). Here is what you need to do:

  • Make each sub-folder that is hosting a ProductCart-powered store an “application”. This may or may not be possible if you are in a shared hosting environment (inquire with your Web host). If you are using a dedicated server:
    • Open IIS and locate the folder that is hosting the ProductCart-powered store
    • IIS 7: Right click on the folder and select “Convert To Application”. Click OK.
    • IIS 6: Right click on the folder and select “Properties”. Select the Directory tab. Under Applications settings, click on Create.
  • Set the 404 Error handler for the new application that you have created (same steps as the ones described above). Make sure that you point it to 404.asp in the ”pc” folder of the store hosted in the folder that you just converted into an application.

For example, the following two ProductCart-powered stores both use the Keyword Rick URLs feature, and are running on the same domain name (

Installation: ProductCart v4.x

If you are using ProductCart v4 and above, 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, if you have the ability to do so, convert the folder that contains the ProductCart-powered store into an application (see above under “Prepare your Web server”) or ask your Web hosting company to do so for you. That should fix the problem.
      If you are unable to do so, you can get around the issue by making 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
        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

    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 ProductCart:

  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 (applies to versions prior to v4.0).
  • 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).


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


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

QR Code
QR Code Keyword-rich and SEO optimized URLs in ProductCart (generated for current page)