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

Canonical Tags

Avatar

Level 2

May I know if there's a way to remove canonical tag on a specific page in AEM?

7 Replies

Avatar

Level 9

Hi @Sejal29 

 

Go to the page properties and navigate to Advanced section and there you will find option to remove canonical URL

 

AvinashGupta01_0-1670426617587.png

 

Hope this helps.

Avatar

Level 9

These properties are available OOB with AEM 6.5 instance. May I know what's the AEM instance version are you using?

Avatar

Community Advisor

Hi @Sejal29 

 

First thing is to identify how they are being added to the page. If it is at the head, you need to write some js code to identify the pages that you need and remove the tags in dom.

 

Hope this helps!

 

Thanks,

Kiran Vedantam.

Avatar

Community Advisor

Hi @Sejal29 

Why do you want to remove canonical tag from just few pages? can you explain the use case here?

Avatar

Level 5

Hi @Sejal29  you can alway use : Page Properties Dialog and if you want to remove programmatically you can use
JCR API: you can programmatically remove the cq:canonical property from the page node.
or Sling API: you can programmatically remove the cq:canonical property from the page node.