Canonical Tags | Community
Skip to main content
tushaar_srivastava
tushaar_srivastavaAccepted solution
Level 6
Dec 13, 2022 9:33 AM UTC

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.

7 replies

tushaar_srivastava
tushaar_srivastavaAccepted solution
Level 6
Dec 13, 2022 9:33 AM UTC

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.

Translate
arunpatidar
New Participant
Dec 8, 2022 9:30 AM UTC

Hi @hello299 

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

Translate
Arun Patidar
Kiran_Vedantam
New Participant
Dec 7, 2022 6:12 PM UTC

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.

Translate
Avinash_Gupta_
New Participant
Dec 7, 2022 3:23 PM UTC

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.

Translate
hello299Author
Level 2
Dec 7, 2022 4:17 PM UTC

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

 

Translate
Avinash_Gupta_
New Participant
Dec 7, 2022 5:03 PM UTC

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

Translate