Document Properties
Kbid27687M
Last Modified04-Feb-2020
Added to KB20-Jul-2016
Public AccessEveryone
StatusOnline
Doc TypeGuidelines, Concepts & Cookbooks
Product
  • ICM 7.7
  • ICM 7.8
  • ICM 7.9
  • ICM 7.10

Concept - Language-Specific and Region-Specific URLs

Product Version

7.7

Product To Version


Status

final

1 Introduction

To avoid duplicate content web sites can make use of the canonical link. When pages for different languages/regions come into play there you can use the href lang link in the HTML <head> section to indicate similar content for other languages/regions (e.g., on product detail pages, content pages, catalog pages). These links can be enabled/disabled in the channel specific preferences.

1.1 References

  • Concept - URL Handling - Special Link Rewriting: a short notation for creating storefront links to categories, products or other CMS pages.

2 Example

The United States product page under http://myshop.com/en/products/yellow_sweater (en-us) may have the same content as the British pendant (en-gb). It is a good practice to use the <link> element with a hreflang attribute set for all languages to avoid duplicate content. So search engines provide language/region specific results and content is not regarded as duplicated.

product page
<head>
  ..
  <link rel="alternate" hreflang="en-us" href="http://myshop.com/us/product/yellow_sweater" />
  <link rel="alternate" hreflang="en-gb" href="http://myshop.com/uk/product/yellow_sweater" />
  <link rel="alternate" hreflang="de-de" href="http://myshop.com/de/produkt/gelber_pullover" />
</head>

3 Target

Link elements with the hreflang attribute are placed in the <head> section of HTML storefront pages. They are automatically created in all available languages on the following pages: product pages, catalog pages, content pages and the Store Finder page.

3.1 Configuration

  1. Log on to the Commerce Management application.
  2. Go to Channel Preferences.
  3. Go to the SEO Settings section.
  4. Here you can enable/disable the href lang feature.

4 Approach

Use the Custom Link Rewriting to create links like:

Page
Custom Link
Product Detail

product://sku@domain?localeId=en_US

Category Detail

catalog://category-id@catalog-id?localeId=en_US

Content Page

page://page-id?localeId=en_US

Any page pipeline://ViewStorefinder-Start?localeId=en_US&highlight=true

The appended parameter localeId determines the locale of the created link.

4.1 Technical

There are four pipelets supporting the href lang link generation:

  • CreateProductHRefLangList
  • CreateCategoryHRefLangList
  • CreatePageHRefLangList
  • CreatePipelineHRefLangList
The created custom links can be rendered using the <islink link="#hreflang:link#> module. Currently they are used in ViewStandardCatalog-Browse/Refresh, ViewProduct-Start, ViewContent-Start and in ViewStoreFinder-Start/Search/Paging .

The link element are currently rendered within the app_sf_responsive_cm/staticfiles/cartridge/templates/default/modules/cms/DefaultPageStructure.isml in dependence of the channel preference HRefLangEnabled is true or false.

Disclaimer

The information provided in the Knowledge Base may not be applicable to all systems and situations. Intershop Communications will not be liable to any party for any direct or indirect damages resulting from the use of the Customer Support section of the Intershop Corporate Web site, including, without limitation, any lost profits, business interruption, loss of programs or other data on your information handling system.

Customer Support
Knowledge Base
Product Resources
Support Tickets