Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

[AEMaaCS] Generate Canonical URL with absolute URL

Avatar

Level 1

We have a requirement to have Canonical URL displayed as absolute URL's. We are using AEMaaCS and are using the latest version of page (v3).  The default behavior is generating a relative URL.  E.g  <link rel="canonical" href=" /content/<siteName>/us/en/<pagename>.html"/>

 

I can see from wknd.site it generates absolute URL's, is there any configuration to support generating canonical URL's with absolute URL's ?  

 

I tried setting up the domain mapping with CQ Link Externalizer (com.day.cq.commons.impl.ExternalizerImpl) but that did not work.

 

I can override the externalize method of SitemapLinkExternalizer class to generate the absolute URL, but I wanted to confirm the page core component does not support absolute URL generation by default before i write the custom code.  Wknd site has this working, so i am not sure if i am missing a step.

 

Appreciate any pointers if you have solved this before.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor
2 Replies

Avatar

Level 7

As far as I remember, it is not available OOTB. You can certainly do the customization for the same in the template.

Avatar

Correct answer by
Community Advisor