cancel
Showing results for 
Search instead for 
Did you mean: 

Duplicated canonical links on html pages

Duplicated canonical links on html pages

Hi, 

 

Get issue with magento 1.9. I put this:

 <link rel="canonical" href="<?php echo 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; ?> "/>

in 

app/design/frontend/base/default/template/page/html/head.phtml:35

 

So website now get canonical URL 

 

Everythings seems fine but i got this issue:

 

On all pages that ends in .html (like contact, or product) i get double canonical in the code. 

 

here is one of pages with issue:

 

https://www.armnet.es/es/contactar.html

1 REPLY 1

Re: Duplicated canonical links on html pages

Sorry, have just solved it by myself. 

 

If someone need the solution: 

 

U must just go to Config - > Catalog - SEO and desactivade this two options: 

 

Use Canonical Link Meta Tag For Categories

Use Canonical Link Meta Tag For Products

 

This solved my problem


@avetikarmndf4b wrote:

Hi, 

 

Get issue with magento 1.9. I put this:

 <link rel="canonical" href="<?php echo 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; ?> "/>

in 

app/design/frontend/base/default/template/page/html/head.phtml:35

 

So website now get canonical URL 

 

Everythings seems fine but i got this issue:

 

On all pages that ends in .html (like contact, or product) i get double canonical in the code. 

 

here is one of pages with issue:

 

https://www.armnet.es/es/contactar.html