URL redirects for SEO Overview
URL redirects are implemented in the following cases:
- When the URL of a catalog entry, catalog group or static page is updated, a redirect is automatically generated between the original URL and the new URL.
- When an extended-site URL for a catalog entry or catalog group is created, the asset store URL is duplicated to the extended site. Then, a redirect is created between the extended site duplicate of the asset store URL and the new URL
- When an extended-site URL is cleared for a catalog entry or catalog group, a redirect is created between the extended site URL and the asset store URL
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.
You 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, you can create a custom user interface to review the following importation traffic data:
- When search engines, affiliate links, and customer personal bookmarks are still referring to old URLs for your catalog entries or catalog groups.
- To delete old URLS from the database to improve system performance.
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. You 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, you can safely delete both the mapping to the target URL and the original URL to decrease your database footprint. You can remove any unused redirected URLs automatically after 60 days by running a scheduler job. Sixty days is the default number but you can change it by setting thenumberOfDays
value in the SEORuntime section of the wc-admin-component.xml infrastructure
configuration file.