diff --git a/docs/concepts/search-engine-optimization.md b/docs/concepts/search-engine-optimization.md index 0b921e54c0e..04e7733d221 100644 --- a/docs/concepts/search-engine-optimization.md +++ b/docs/concepts/search-engine-optimization.md @@ -39,3 +39,23 @@ It is also possible to use translation keys here. [`seo.effects.ts`](../../src/app/extensions/seo/store/seo/seo.effects.ts) is the central place for customizations concerning dynamic content, e.g. names of products or categories (asynchronous data from the API). Effects are an essential part of our [State Management](./state-management.md). + +## Optimized URLs + +Optimized URLs are a major factor in determining search engine rankings. They should have a clear structure and must be readable. +By default, product, category and content page routes contain their localized context path. +Parameters are appended to theses paths that contain localization-independent and uniquely identifiable data. + +| Type | Structure | Parameter | Example | +| ------------ | ---------------------------------------- | ------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | +| category | complete category path | **-ctg**: category id | /computers/notebooks-and-pcs/notebook-accessories-ctgComputers.1835.1284 | +| product | complete category path with product name | **-prd**: product sku,
**-ctg**: category id | /computers/notebooks-and-pcs/notebook-accessories/kensington-keyfolio-prd5981602-ctgComputers.1835.1284 | +| content page | complete content page path | **-pg**: content page id | /help/faq/seo/how-to-pghow-to-seo | + +**_NOTE:_** The given parameters for each url are needed to differentiate category, product and content page routes. +It is important to ensure that no identifier contains the specified parameter id. +For example, a category name including a `-ctg` substring could lead to unwanted behavior. + +**_NOTE:_** Route generation and parsing for category, product and content-page routes can be customized. +This will require changes to the well documented [`product.route.ts`](../../src/app/core/routing/product/product.route.ts), [`category.route.ts`](../../src/app/core/routing/category/category.route.ts) or [`content-page.route.ts`](../../src/app/core/routing/content-page/content-page.route.ts) files. +Additionally, the corresponding pipes (e.g. [`product-route.pipe.ts`](../../src/app/core/routing/product/product-route.pipe.ts)) might have to be updated to fit your needs as will [`routing.ts`](../../src/app/core/utils/routing.ts).