SEO-friendly URL construction with a default catalog

SEO-friendly URLs are constructed by using a pattern to determine how to build the URL. A part of the pattern requires the tokens StoreToken:CatalogToken to be defined in the SEOURL table and an associated URLKEYWORD in the SEOURLKEYWORD table. With the introduction of a default catalog, a StoreToken: token entry is preconfigured in the SEOURL table.

For example, in the SEOURL table, there exists a row that resembles the following tokens for the Aurora starter store:
SEOURL_ID TokenName TokenValue
13227 StoreToken:CatalogToken '10001:'
The token is associated with a URLKEYWORD in the SEOURLKEYWORD table, in this example, 'aurora'. Notice that there is no CatalogToken value in the TokenValue column. By default, if you do not specify a default catalog in the Catalogs tool, the master catalog is the default catalog.

If your store contains sales catalogs and the catalogs do not have token entries in the SEOURL and SEOURLKEYWORD tables, then an SEO URL cannot be constructed for your sales categories. But, if you set the sales catalog as your default catalog, then the preconfigured StoreToken: token entry is used and an SEO URL is constructed with the associated URLKEYWORD, in this case 'aurora'.

For example:
  1. In the Catalogs tool, you create a sales category in a sales catalog.
  2. In the Search Engine Optimization tab of the sales category, you specify a URL keyword sales-apparel.
  3. Set the sales catalog as your default catalog.
The resulting SEO URL that is constructed would be http://www.myhost.com/shop/en/aurora/sales-apparel

However, if you set up tokens in the SEOURL and SEOURLKEYWORD tables for the sales catalog, then the new URLKEYWORD entry is used instead.

For example, if you enable SEO with a sales catalog and set the URLKEYWORD to 'teststore', then the constructed SEO URL would be http://www.myhost.com/shop/en/teststore/sales-apparel.
Important: If you plan to set a sales catalog as the default catalog, ensure that your SEOURL table also has a StoreToken:CatalogToken entry for the master catalog. If not, then SEO URLs cannot be constructed for categories in your master catalog.
Note: SEO URLs for products are always constructed with the URLKEYWORD associated with the default catalog, regardless of the catalog that the product belongs to.