Canonical Tags | Community
Skip to main content
Best answer by tushaar_srivastava

Hi @hello299  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.

4 replies

Avinash_Gupta_
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
December 7, 2022

Hi @hello299 

 

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

 

 

Hope this helps.

hello299Author
Level 2
December 7, 2022

How did you add this in your page properties. Cannot find at my end

 

hello299Author
Level 2
December 8, 2022

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


AEM 6.5

Kiran_Vedantam
Community Advisor
Community Advisor
December 7, 2022

Hi @hello299 

 

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.

arunpatidar
Community Advisor
Community Advisor
December 8, 2022

Hi @hello299 

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

Arun Patidar
tushaar_srivastava
tushaar_srivastavaAccepted solution
Level 6
December 13, 2022

Hi @hello299  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.