Skip navigation.

The following article has been written by James Saunders, Managing Director of Site-Report.com.


One common request that we receive is for details of search-engine friendly shopping carts. This articles details the issues with existing shopping carts and the simple rules that can be followed to create a truly search-engine friendly ecommerce system and shopping cart.

Search-Engine Unfriendly Shopping Cart Techniques

A number of techniques are commonly used by ecommerce software vendors that make the web sites that are generated by that software either difficult or impossible for search engines to spider. This means that those web site's pages are less likely to be listed in the major search engines. These techniques include:

  • use of JavaScript
  • use of frames
  • use of dynamically generated pages

Clearly by avoiding each of these, you will have a more search-engine friendly web site.

Some ecommerce solution vendors do offer 'search-engine-friendly shopping carts' for dynamically-generated web sites. However, the technique that is used is to create static copies of dynamically-generated web pages. This is unnecessary! It involves additional expense and time.

However, there are some real benefits to dynamically generated web sites, particularly those that offer a large number of products.

Don't use frames

There really aren't many good reasons for using frames. They used to be very useful for providing a consistent look-and-feel and navigation between pages. They also were useful when corporate identity such as the main header of the page including the company logo was displayed even if the page was scrolled.

Search-engines are interested in the following information from a web-page:

  • title tag
  • description tag

The use of frames often results in all pages in the frame having the same title and description tag. This is not ideal as an ecommerce web site needs as many unique pages in the search engine listings as possible.

By not using frames, you can ensure that each page has its own unique title and description. As the categories and products are stored in a database, the search engine optimised title and description can be read from the database and loaded into the appropriate meta tag.

Don't use JavaScript

JavaScript has traditionally been used in shopping cart systems for a number of reasons. These include:

  • rollover menu images
  • core shopping cart functionality
  • visitor-tracking

As approximately 10% of internet users have JavaScript disabled and with the use of PDAs, Smartphones etc to access the Internet becoming more popular (these have limited or no JavaScript capability), its use should be seriously considered. If you are considering purchasing an ecommerce software solution, disable Javascript and reload the demo site page. You may be surprised to see a blank-page.

There are many tracking solutions that are server based and do not require Javascript.

Finally, rollover menu effects can be achieved easily with the use of cascaded style sheets (CSS).

Use Dynamically-Generated Pages in a Search Engine Friendly way

There are some real benefits to dynamically generated web sites, particularly those ecommerce sites that offer a large number of products.

But, dynamically-generated web sites have traditionally not been spidered by search engine spiders. However, things have changed and search engines, including Google, do spider dynamically-generated web pages as long as you keep in mind a couple of simple rules. Search engines do not like:

  • more than 2 data-pairs in a query string, e.g.
    • http://www.site-report.com/product.php?catid=123&subcatid=234&prodid=345
  • a session id (or anything that may look like a session id) in the query string, e.g.
    • http://www.site-report.com/product.php?PHPSESSID=acf2b1f9fc8ca27775148fe0a28905

With these rules in mind, a dynamically-generated ecommerce site can be spidered and more importantly optimised for search engines. Here's how....

Ensure that you restrict the number of data-pairs in the query string to 2. This may require some clever thought but is easily achievable. For example, in the query string shown above, the catid, subcatid and prodid could be concatenated to produce the following:

    http://www.site-report.com/cart.php?catid=123_234_345

Most shopping carts rely on the use of session cookies or cookies. Therefore there is every likelihood that unless you are careful, you could end up with a session ID in your query string. Search engines do not like this as session ids could be used to produce an unlimited number of pages using the same dynamic page, eg product.php.

However, it is obvious that search engines are unable (unfortunately!) to purchase from your web site and therefore cookies and session cookies are not required. Therefore, you can simply detect that a search engine is crawling your site and not start a session. In PHP, this can be achieved using the following code:

    <?php
    if ( (strstr($HTTP_SERVER_VARS['HTTP_USER_AGENT'] ,'Googlebot')) ||
    ||(strstr($HTTP_SERVER_VARS['HTTP_USER_AGENT'] ,'slurp@inktomi.com;')))
    {
    // a spider, therefore don't start sessions
    }
    else
    {
    // start the session
    session_start();
    }
    ?>

So there you have it...

Creating a search engine ecommerce solution isn't as difficult as it used to be. Nor do you need to invest in producing static HTML versions of your dynamic web site.

If you are an ecommerce solution provider who would like consultancy in making your product search engine friendly, check out our article on how we assisted a leading UK shopping cart provider make their product produce more search engine optimised web sites.

For further information, please click here to contact us.

A PDF version of this article is available (PDF 72kb).

Average Rating 3 out of 5 based on 42 votes

Copyright 2003 Site-Report.com/James Saunders. All Rights Reserved. Reprint rights by written permission of the author.

free telephone consultation

Popular Services

  • Ecommerce Site-Report
  • Make sure your ecommerce site is performing at its best.
    Our experts analyse your web site and identify problems that may lead it to under-perform.

    £399.95 (exc VAT)
    £469.94 (inc VAT)

    more information...
    view an example report (PDF)..


  • SEO Review
  • Ensure that your target customers can find your website with our in-depth analysis of your current search engine placement, any impediments that may result in poor placement and an action-list to improve your site's ranking.

    £165.95 (exc VAT)
    £194.99 (inc VAT)

    more information...

Tools

find out about how we can help you understand how visitors use your website

SafeBuy Qualified Adviser

Site-Report have been recommended by SafeBuy members for our Site-Reports

[ More Details ]

Testimonials

  • TravelAWOL wrote "Site-Report.com compiled a very detailed and informative report which stressed all the major issues we needed to address to ensure the site worked effectively and efficiently."
  • [ More testimonials ]