Expand my Community achievements bar.

Associate Vanity URLs with expiry date

Avatar

Level 2

Hello everyone, 

I have a requirement to associate the Vanity links to an expiry date. 
(i.e.) Say I have a Page A 
on the Vanity section am using the following vanity links 

/campaign/101-June-2025
/campaign/225-Dec-2025
/campaign/301-Jan-2026


When the Vanity expires, I should not only remove this entry on the page but also update the links/CTAs that point to the expired page with some other link. 


Can you please suggest how to achieve this ? Do let me know if there is an alternative ? 

2 Replies

Avatar

Community Advisor

Hi @harishdev 

I am not sure if there is any OOTB feature available.

But you can write a cron job that check those pages(configuration)-

  • search for the reference via using RefreshSearch 
  • remove the expired vanity from page
  • Update the link refresh
  • publish all the updated pages
Arun Patidar

AEM LinksLinkedIn

Avatar

Level 8

Because automatically changing website content is a sensitive operation, I suggest, in addition to Arun's suggestion, that editors manually verify algorithmic changes before publication. This preview would allow editors to review the algorithm's output.