It is not possible force canonical url in category listing

  • Posts: 81
  • Thank you received: 13
  • Hikaserial Standard Hikashop Business
4 years 8 months ago #309947

Hi,
I have set to force canonical url, but search engines index the product sheet through a category listing that does not correspond to the canonical url.
Google indexes and shows when we visit the product a canonical url that does not correspond to the canonical url that we have created in the product sheet. (item menu home is a item menu type hikashop category listing)
How can I do to block this indexing? and index only the true canonical url.

Thank you
Javier


Javier Ballester
Hikashop Joomla! Magazine in Spanish
Tu tienda Online Joomla! Hikashop
magazine.joomla.org/es/all-issues/februa...enda-online-joomla-3
Last edit: 4 years 8 months ago by Jerome. Reason: the attachment was not uploaded

Please Log in or Create an account to join the conversation.

  • Posts: 81539
  • Thank you received: 13069
  • MODERATOR
4 years 8 months ago #309976

Hi,

If I check a product page on your website, I can see that you have two canonical URL tags in the header of the page.
One comes from HikaShop and must contain the correct canonical URL and the other must come from something else.
So you need to disable that something else which adds that second canonical URL where it shouldn't.
It's possibly the Joomla system sef plugin which does that so try disabling it (it has been reported as the culprit before) via the Joomla plugins manager. But it could also be any other SEF / canonical plugin/component you might have on your website...

Please Log in or Create an account to join the conversation.

  • Posts: 81
  • Thank you received: 13
  • Hikaserial Standard Hikashop Business
4 years 8 months ago #310005

Hi Nicolas,
It seems that the duplicity of canonical urls comes with the template Helix Ultimate and Joomla, where each one creates a canonical url. I tried to activate the Protostar template and the problem is solved. Then I followed a JoomShaper forum post where they indicate how to cancel the canonical url that Helix needs.
The problem is solved although in future updates I fear that it will happen again if Helix creates a url and Joomla another.

www.joomshaper.com/forums/double-canonical-links-how-to-avoid

Best regards
Javier


Javier Ballester
Hikashop Joomla! Magazine in Spanish
Tu tienda Online Joomla! Hikashop
magazine.joomla.org/es/all-issues/februa...enda-online-joomla-3
The following user(s) said Thank You: nicolas

Please Log in or Create an account to join the conversation.

  • Posts: 81
  • Thank you received: 13
  • Hikaserial Standard Hikashop Business
4 years 8 months ago #310012

Hi,
I think that the problem was not completely solved.
Removing the following line from the template Helix Ultimate

<link rel = "canonical" href = "<? php echo JUri :: getInstance () -> toString ();?>">

I get that Hika products just show one canonical url, ok url canonical product, but all other content that is not from Hika, the html does not show any canonical url (articles, etc ..)

I have tested this situation on 2 sites with the same results. From my point of view, I believe that the communication is not correct between Hikashop and JoomShaper at the time of building the canonical url, but I don't know where the origin is

Best regards
Javier


Javier Ballester
Hikashop Joomla! Magazine in Spanish
Tu tienda Online Joomla! Hikashop
magazine.joomla.org/es/all-issues/februa...enda-online-joomla-3

Please Log in or Create an account to join the conversation.

  • Posts: 1119
  • Thank you received: 114
4 years 8 months ago #310023

Hi,

I don't think having canonical url for pages like "returns" will drive you some more traffic from google organic search or make any difference. Canonical url is used to avoid dublicate content.... And you won't get dublicate content for such pages... As example we use canonical only for Hikashop and it works fine. Other pages don't have it and there is no dublicate content indication via google webmasters tool.

However if you still want to have canonical for other pages. You may want to add additional check in Helix Ultimate index.php file like this:

$app  = JFactory::getApplication();
// Detect Active Variable
$option   = $app->input->getCmd('option', '');
// Check If Not Hikashop
if ($option !== 'com_hikashop') {
	echo '<link rel = "canonical" href = "'.JUri :: getInstance () -> toString ().'">';
}

So this will be used only on pages which are not from Hikashop component.

Hope that helps.

Thanks

The following user(s) said Thank You: Jabatec, Mohamed Thelji

Please Log in or Create an account to join the conversation.

  • Posts: 81539
  • Thank you received: 13069
  • MODERATOR
4 years 8 months ago #310013

Hi,

No, It's not a matter of mis communication.
It's because that line of code from your template is just stupid. It just take the current URL of the page and use it as canonical URL.
If you access a Joomla article page from two different pages (which is totally possible, with the search, or just adding an extra parameter, or different menu items accessing the article) you'll get two different canonical URLs, where the point of the canonical URL tag is to point to a unique URL for the same content.
So I would recommend to not depend on that canonical tag from your template and setup a real canonical handling extension.

The following user(s) said Thank You: Jabatec

Please Log in or Create an account to join the conversation.

Time to create page: 0.077 seconds
Powered by Kunena Forum