Skip to Content
0
Jul 30, 2020 at 12:27 PM

SEO country-specific urls

119 Views Last edit Jul 30, 2020 at 12:30 PM 2 rev

We need to set up country-specific urls for the home page, products and categorie.

Currently all urls start with:

  • "/p" for products
  • "/c" for categories

Tomorrow it is desired to differentiate the urls for Switzerland and Belgium with the aim of improving SEO of theses countries.

Examples

Home

Category

Product

Context:

  • SAP Commerce 1905
  • Only one website
  • Only one product catalog
  • Multi-country is used with 2 basestore (EUR and CHF)
  • The catalog is only translated into French
  • Belgium doesn't "exist" because it's the same product, price, stockleve as French. There is therefore no need (a priori) to create a baseStore, catalog or website for Belgium. Page on FR and BE will be the same
  • We will add the "hreflang" metas to avoid content duplication by search engines (https://support.google.com/webmasters/answer/189077)


Our approach is as follows

Create a new attribute which can be configured in urlEncodingAttributes by creating a new class on the same basis as DefaultLanguageAttributeManager but which will allow:

1) Limit the addition of the prefix only to product, categories and home page

2) To set the session currency as follows:

  • "" -> EUR (as "fr-fr" but we don-t want to show "fr-fr" in url prefix)
  • "be-fr" -> EUR
  • "ch-fr" -> EUR

Does anyone have another idea of approach