Url Shortening without Dispatcher configuration in AEM 6.5 | Adobe Higher Education
Skip to main content
Level 2
January 28, 2025
Resuelto

Url Shortening without Dispatcher configuration in AEM 6.5

  • January 28, 2025
  • 4 respuestas
  • 946 visualizaciones

Hi Everyone,

Currently, in my project, we handle URL shortening using dispatcher rules like below.

Example: www.domain.com/us/en/testpage.html -> internal redirect to /content/project/us/en/home/testpage

Now, we have a new requirement: we need to achieve this without using a dispatcher rules.

Example:

If I access www.domain.com/us/en/testpage.html or www.domain.com/testpage.html, it should resolve to the path /content/project/us/en/home/testpage

 

 

Experts, kindly suggest your solutions. Thanks in advance!

Mejor respuesta de PRATHYUSHA_VP

Hi @jooca 

 

There is no centralized management Ui in AEM to manage vanity redirects in AEM.

 

You can check below article for vanity URL management redirects in AEM and dispatcher URL configurations

 

https://experienceleague.adobe.com/en/docs/experience-manager-learn/ams/dispatcher/disp-vanity-url

 

https://blog.3sharecorp.com/enabling-vanity-urls-with-adobe-experience-manager

 

Hope this helps !

 

Thanks 

4 respuestas

PRATHYUSHA_VP
Community Advisor
Community Advisor
January 28, 2025

Hi @jooca

 

You can use sling mappings for the URL shortening in AEM with resource resolver. 

 

Below is the recent blog shared by @daniel-strmecki for the same. Check it out

 

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager-blogs/aem-url-shortening-sling-mappings-vs-dispatcher-rewrites/ba-p/731572

 

Hope this helps

joocaAutor
Level 2
January 30, 2025

Can  you explain how vanity path URLs working for pages? I need to see the technical details, like GitHub code examples. I want to apply the same concept to DAM assets as well.

PRATHYUSHA_VP
Community Advisor
PRATHYUSHA_VPCommunity AdvisorRespuesta
Community Advisor
January 31, 2025

Hi @jooca 

 

There is no centralized management Ui in AEM to manage vanity redirects in AEM.

 

You can check below article for vanity URL management redirects in AEM and dispatcher URL configurations

 

https://experienceleague.adobe.com/en/docs/experience-manager-learn/ams/dispatcher/disp-vanity-url

 

https://blog.3sharecorp.com/enabling-vanity-urls-with-adobe-experience-manager

 

Hope this helps !

 

Thanks 

joocaAutor
Level 2
January 30, 2025

Can someone explain how vanity path URLs working for pages? I need to see the technical details, like GitHub code examples. I want to apply the same concept to DAM assets as well.

AmitVishwakarma
Community Advisor
Community Advisor
February 2, 2025

To implement URL shortening without dispatcher rules in AEM, you can use Sling Mappings. This allows you to map custom URLs to resources. For DAM assets, you can use vanity URLs.

 

For detailed steps on vanity URL management and using Sling Mappings, you can refer to these resources:

Vanity URL Configuration in AEM- https://experienceleague.adobe.com/en/docs/experience-manager-learn/ams/dispatcher/disp-vanity-url

Enabling Vanity URLs in AEM - https://blog.3sharecorp.com/enabling-vanity-urls-with-adobe-experience-manager

 

These guides will help you apply the same concept to DAM assets.

Amit Vishwakarma - Adobe Commerce Champion 2025 | 16x Adobe certified | 4x Adobe SME
daniel-strmecki
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
February 2, 2025

@jooca just be careful with using Sling mappings in case you need to support the same Vanity URLs on multiple domains. Reasons why are explained in the article: https://meticulous.digital/blog/f/aem-url-shortening-sling-mappings-vs-dispatcher-rewrites

Also, you said you have a requirement "We need to achieve this without using Dispatcher rules". How and why is that a requirement? Business requirements are usually "I want to have short URLs" or "I want to have SEO-optimized URLs" and then it's up to the development team to find the best implementation.

 

Good luck,

Daniel