Skip to main content
sridhar-a
New Member
Jul 21, 2022 2:21 AM UTC
Solved

[AEMaaCS] Generate Canonical URL with absolute URL

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.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

3 replies

Adobe Employee
Jul 21, 2022 5:23 AM UTC

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

Translate
New Member
Jul 2, 2024 9:33 PM UTC

@sridhar-a  How was this resolved? Did you customize it ?

Translate