Vanity URL is not working when a page url contains selectors | Community
Skip to main content
Level 3
November 27, 2020
Solved

Vanity URL is not working when a page url contains selectors

  • November 27, 2020
  • 2 replies
  • 2311 views

If i have a page with 

https://localhost:4502/content/myproject/us/en/home/test-page.html

The above page contains a component which will add a selector

https://localhost:4502/content/myproject/us/en/home/test-page.model.html

model- selector

i have added a vanity url for the above page as /aempage 

when i access the endsite url  for the above page as https://localdev.example.com/vanityurl

https://localdev.example.com/aempage -> it redirects to 404 page

 

How do i implement vanity url in the above case

 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by shelly-goel

@shwetha1994  Does http://localhost:4502/aempage works for you?

 

Since the vanity URLs are working in the author/ publish instance, it's not an issue related to selectors. Basically, dispatcher level additional configuration has to be done for new vanity URLs to be picked up. This is explained here: https://experienceleague.adobe.com/docs/experience-manager-dispatcher/using/configuring/dispatcher-c... and you can also follow the 2nd link that Brian shared to configure vanity URLs in dispatcher

2 replies

BrianKasingli
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
November 27, 2020

@shwetha1994,

Take a look at these two articles:

  1. https://www.nextrow.com/blog/adobe-experience-manager/a-comprehensive-guide-on-vanity-url-in-aem
  2. https://www.nextrow.com/blog/adobe-experience-manager/vanity-urls-in-aem-part-2

And I don't think the out of the box vanity URL will work with selectors, it only works with the .HTML extension. 

shelly-goel
Adobe Employee
shelly-goelAdobe EmployeeAccepted solution
Adobe Employee
November 29, 2020

@shwetha1994  Does http://localhost:4502/aempage works for you?

 

Since the vanity URLs are working in the author/ publish instance, it's not an issue related to selectors. Basically, dispatcher level additional configuration has to be done for new vanity URLs to be picked up. This is explained here: https://experienceleague.adobe.com/docs/experience-manager-dispatcher/using/configuring/dispatcher-c... and you can also follow the 2nd link that Brian shared to configure vanity URLs in dispatcher

Level 3
November 30, 2020
yes this works, http://localhost:4502/aempage redirect to this page only, but the short url will not be changed to long url