Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

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 5

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