canonical url for source code only

  • Posts: 96
  • Thank you received: 6
  • Hikashop Business
6 years 2 months ago #288417

-- url of the page with the problem -- : mavendesignstudio-demo.com/antique-swan/
-- HikaShop version -- : 3.2.2
-- Joomla version -- : 3.8.5
-- PHP version -- : 7

Canonical URLs are important on this site because there are products that display in multiple categories. For example, Garden Items is the parent with a child category of Garden Furniture, and there is also an All Products category and corresponding menu item. A product could be categorized in all three.

Let's use this as a direct example:
mavendesignstudio-demo.com/antique-swan/...of-teak-from-england
mavendesignstudio-demo.com/antique-swan/...of-teak-from-england
mavendesignstudio-demo.com/antique-swan/...of-teak-from-england

If I were to assign a canonical URL using the Garden Item, i.e. mavendesignstudio-demo.com/antique-swan/...of-teak-from-england
When the user finds the product under All Products they are taken to the Garden Item menu instead of staying on All Products. Same if they were to find the product via Garden Furniture.

Ultimately, it would be great if the canonical URL could reside in the source code only and not change the menu URL and breadcrumb. We are only interested in having a search bot know the information, not the user.

Is there a way to have the canonical URL not generate the alias or breadcrumb?

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

  • Posts: 81511
  • Thank you received: 13066
  • MODERATOR
6 years 2 months ago #288463

Hi,

That's actually the case by default. The canonical URL is only added to the meta data of the product page so that the search engines know which URL is the main one while you can keep different URLs for the normal browsing of the website.
If the canonical URL is used on the listings, it's because you must have activated the "force canonical URLs on listings" setting of the HikaShop configuration.

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

  • Posts: 96
  • Thank you received: 6
  • Hikashop Business
6 years 1 month ago #288537

OK, got it, thank you Nicolas. I misunderstood the setting in the configuration. I now have it set to "No, generate the URLs" and we will manually insert the canonical.

Last edit: 6 years 1 month ago by karendunne. Reason: additional info

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

Time to create page: 0.038 seconds
Powered by Kunena Forum