URL redirects for SEO Overview

Part of the search engine optimization (SEO) solution includes 301 redirection. If a URL is changed either by WebSphere Commerce or a business user, a redirect is automatically generated between the original URL and the new URL.

URL redirects are implemented in the following cases:

In all of the above cases, if the URL of a catalog entry or a catalog group is updated multiple times, then all previous redirects are updated to point to the latest URL for that catalog object. This way, redirection chains are avoided.

We can create a 301 redirect in different ways. A common method is to set up web server mod rewrite rules in the web server configuration file. This method might require many redirect rules - a rule for each category and product on the site. Usually, it is impossible to create a single redirect rule to handle every redirect to SEO URLs. Another method is to customize the web application layer to automatically redirect the URLs. For more information see, Redirecting legacy URLs to SEO friendly URLs in WebSphere Commerce.


Traffic statistics for URL redirects

Traffic statistics are recorded for individual redirect mappings. These statistics are stored in the SEOREDIRECTTRAFFIC table. This table contains the last used date of each redirect mapping, and the number of times that the redirect mappings are used.

There is no user interface to view these statistics; however, we can create a custom user interface to review the following importation traffic data:

To improve performance, traffic statistics for 301 redirects are not sent to the database each time a redirect rule is applied. Instead, the data is stored in a cache, and is flushed to the database only when a certain number of redirects has occurred. We can specify the number of redirects by using to the redirectHitCountBatchUpdateSize parameter in the SEORuntime section of the wc-admin-component.xml infrastructure configuration file.


Removing unused URLs

When redirect mappings are infrequent, we can safely delete both the mapping to the target URL and the original URL to decrease the database footprint. We can remove any unused redirected URLs automatically after 60 days by running a scheduler job. Sixty days is the default number but we can change it by setting the numberOfDays value in the SEORuntime section of the wc-admin-component.xml infrastructure configuration file.


Related concepts
SEO


Related reference
Customizing the SEO component configuration properties