Commerce has a restriction on reusing keywords for multiple languages in the same store. However, you may want to share the URL keywords between multiple languages. For example, if you have US English and Canadian English (ex. en_US, en_CA), you may want to have the same keywords between both languages. To do this, you will need to do the following (replacing en_US/en_CA with your scenario):

Create URL keywords for en_US. Do not create any URL keywords for en_CA.

In your store's JSPs, check if the locale is en_CA. If so, when creating the wcf:url tag, set urlLangId = -1 (en_US languageId).

This will result in both en_US and en_CA sharing the same URL keywords.

You may be leveraging the CleanSEOURLs scheduled job on your production site to periodically clean unused SEO redirect rules. Once a redirect rule is deemed obsolete the original URL keyword that was used in that rule is also deleted. These are the URL keywords that are marked as "inactive" when a redirect rule is created. This command will delete entries from the SEOREDIRECT, SEOREDIRECTTRAFFIC, SEOURLKEYWORD and SEOURL tables.

The issue arises when a URL keyword is deleted from the production database. When this occurs, the production and staging databases are no longer in sync in terms of their SEO URL keywords. If you are updating/inserting SEO URL keywords using the stagingprop utility, this may lead to collisions or constraint problems depending on the data being loaded.

The DownloadStatistics job is typically used to bring over marketing and search statistics data from the production database to staging using the Quick Publish Datasource. However, you can also configure this job to copy over data from any other table on production you wish to configure. You can add a new table mapping in the wc-component.xml file as described here:

Double-check whether you have a missing or malformed SEOConfiguration element defined in your instance configuration file (wc-server.xml). If this is not there, add the default element near the end of the file:

Ever seen an issue where the recommendation e-Marketing Spot would redirect users to the non-SEO URL instead of the expected SEO URL?

This issue may be caused by the code in CatalogEntryDisplay_Data.jsp specifying use of the ProductURLWithParentCategory SEO pattern for e-Marketing Spot recommendations when it is not appropriate to be using this pattern since some products do not have two parent categories.

To resolve this issue, you can update the CatalogEntryDisplay_Data.jsp so that the line:

So we see that it does pick up that a redirect should occur as well as where it should redirect to, but it doesn't complete the redirect. What happens is that the RedirectEngine class executes performRedirect but the redirect doesn't reach the browser. performRedirect then sets the header data to a response object status of 301. After than struts' BaseAction.executeView tries to resolve the command using SEO URL but fails and instead redirects to the GenericError page.

Suppose you have a store which supports two languages, langId=-1 (default English) and langId=-2 (French). You are leveraging the wcf:url tag on your pages to construct SEO URLs for a new view, in this example 'MyPageView'. However, after implementing the tag, the SEO URL isn't constructed properly on the page for langId=-2.

The following traces can be enabled to allow us to look deeper into the problem:

A simple modification to improve SEO of your store is to remove the context root of the URL. The context root of the URL is used by Commerce to determine the web archive accessed (for example, Stores.war). By removing the context root of a storefront URL, while still using the correct path "behind-the-scenes", the URL will be shorter and more SEO-friendly. The context root we use on the storefront is: "/webapp/wcs/stores/servlet/"

Instead of using the default URL (<domain>/webapp/wcs/stores/servlet/en/aurora), you can do some simple modifications to remove the context root of the URL so you can have URLs like <domain>/en/aurora

To remove the context root of a storefront URL you can do the following:

Download and apply JR45894 at the product and instance level to allow you to use an empty context root. This fix is already included in FEP7, so if you are on FEP7, you can skip this step.

Download and apply JR49311 at the product and instance level to be able to use store preview with an empty context root (will not work otherwise).

Open httpd.conf located in <WC_INSTALLDIR>/instances/<INSTANCE_NAME>/httpconf/httpd.conf

Add the RewriteRule highlighted below:

Restart your HTTP server.

Open <INSTANCE>.xml and look for the SEOConfigurationtag.

Edit it so it looks like the following:

Run the config_ant script under WAS user like so: ./config_ant.sh -DinstanceName=<INSTANCE_NAME> UpdateEAR

Restart your Commerce server under WAS user as well.

View your storefront by using a URL without a context root. Links to other store pages will also use the empty context root.

Note: If you have static pages like <DOMAIN>/index.html, then you will want to create a rewrite rule condition to exclude these pages like so: