Hi everyone,
I’m working with Adobe Experience Manager Storefront Delivery Services and need to customize my URL structure for categories and products to be cleaner and more SEO-friendly. Right now, my URLs look like this:
Categories:
https://example.com/categories/maquillaje
Products:
https://example.com/products/toleriane-purifying-foaming-face-wash-for-oily-skin/ULT0011
The client’s requirement is to remove those prefixes so the URLs become:
Categories:
https://example.com/maquillaje
Products:
https://example.com/toleriane-purifying-foaming-face-wash-for-oily-skin/ULT0011
What I’ve tried:
SEO considerations:
Questions:
Thank you in advance for your guidance!
Solved! Go to Solution.
Hi @olsalas711 ,
You can try to customize the URL with following options:
To provide a custom URL format, a project can implement either the ProductUrlFormat
or the CategoryUrlFormat
service interface and register the implementation as OSGI service. Those implementations, if available, replace the configured, pre-defined format. If there are multiple implementations registered, the one with the higher service ranking replaces the ones with the lower service ranking.
The custom URL format implementations must implement a pair of methods to build a URL from given parameters, and to parse a URL to return the same parameters respectively.
In addition to the UrlProvider
, it is also possible to configure Sling Mappings to rewrite and process URLs. The AEM Archetype project also provides an example configuration to configure some Sling Mappings for port 4503 (publish) and 80 (Dispatcher).
URL rewrites can also be achieved by using AEM Dispatcher HTTP server with mod_rewrite
module. The AEM Project Archetype provides a reference AEM Dispatcher config which already includes basic rewrite rules for the generated size.
You can find more details on below link:
https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/content-and-comm...
-Tarun
Hi @olsalas711 ,
You can try to customize the URL with following options:
To provide a custom URL format, a project can implement either the ProductUrlFormat
or the CategoryUrlFormat
service interface and register the implementation as OSGI service. Those implementations, if available, replace the configured, pre-defined format. If there are multiple implementations registered, the one with the higher service ranking replaces the ones with the lower service ranking.
The custom URL format implementations must implement a pair of methods to build a URL from given parameters, and to parse a URL to return the same parameters respectively.
In addition to the UrlProvider
, it is also possible to configure Sling Mappings to rewrite and process URLs. The AEM Archetype project also provides an example configuration to configure some Sling Mappings for port 4503 (publish) and 80 (Dispatcher).
URL rewrites can also be achieved by using AEM Dispatcher HTTP server with mod_rewrite
module. The AEM Project Archetype provides a reference AEM Dispatcher config which already includes basic rewrite rules for the generated size.
You can find more details on below link:
https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/content-and-comm...
-Tarun
Hi @olsalas711,
Did the shared solution help you out? Please let us know if you need more information. Otherwise kindly consider marking the answer as ‘correct’.
If you've discovered a solution yourself, we would appreciate it if you could share it with the community.
Views
Replies
Total Likes