Skip to Content

SEO country-specific urls

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.






  • 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 (

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

Add a comment
10|10000 characters needed characters exceeded

Related questions

0 Answers

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.