- Posts: 150
- Thank you received: 11
Canonical urls
I did something wrong on canonical urls.
Some products have "wrong" canonical urls: they dont have the right path, instead of that they are pointing to a wrong path category like "/index.php/hikashop-menu-for-brands-listing/product/product_name" or "/index.php/books/product/product_name" (the product isnt a book). Some other products have the right canonical urls, pointing to the right URL.
I searched in forum and I noticed that I should have disabled the joomla's sef plugin. Also, I had the option "No, generate the URLs" on "Force canonical URLs on listings"
I would like to set the canonical urls in every product, especially in the wrong ones.
Thank you in advance.
Please Log in or Create an account to join the conversation.
If you want to have HikaShop fill in the canonical URLs for you you need to:
- clear all the canonical URLs of your products with a mass action: www.hikashop.com/forum/install-update/89...ith-mass-action.html
- set the "force canonical URLs on listings" setting to "Use canonical URL and generate it if missing" in the HikaShop configuration
- browse the listings of the products on the frontend so that the system can generate the new canonical URLs of the products.
Please Log in or Create an account to join the conversation.
Everything is fine now.
Thank you very much nicolas.
Please Log in or Create an account to join the conversation.
I have the same problem on categories.
They are really messed up.
Can I fix them with Mass actions?
Thank you in advance.
Please Log in or Create an account to join the conversation.
Yes. It's the same process:
- clear all the canonical URLs of your categories with a mass action
- set the "force canonical URLs on listings" setting to "Use canonical URL and generate it if missing" in the HikaShop configuration
- browse the listings of the categories on the frontend so that the system can generate the new canonical URLs of the categories.
Please Log in or Create an account to join the conversation.
And how can I reset the category canonical url? I cant find the right field.
Thank you in avance..
Edit: it was early and didnt see the field in the category option. Sorry for bothering you.
Thank you for helping me.
Please Log in or Create an account to join the conversation.
I navigate on the categories in the front end, after I deleted the canonical URL, but they didnt update in back-end.
Please Log in or Create an account to join the conversation.
You need to browse them from your main menu item which lists the categories.
If you browse them from the menu module itself, then it just displays the listing of the products of the category selected in the menu item, and thus there is no canonical URL to calculate.
It needs to display a listing of category. to calculate the canonical URL of each category in the listing.
Please Log in or Create an account to join the conversation.
I navigate via the hyper menu, clicked on the first item in the main menu, redirect on the categories listings.
What I did wrong ?
Thank you in advance.
Please Log in or Create an account to join the conversation.
I'm not sure what you did.
Here is the explanation with a screenshot:
monosnap.com/file/TYfDW7UHJIayDswe5ofepawESFZoqL
Please Log in or Create an account to join the conversation.
That is what I did and tried to do it again, but I dont get update on the canonical URL in categories.
Thank you in advance.
Edit 1: On mobile is working and is setting the mobile-menu on each category, but on desktop doesnt update the values.
Edit 2: I am thinking that maybe there is something wrong with my menu. You said above nicolas that I shouldnt navigate through modules, so I chaecked if there is a module in my menu. There wasnt. Then I change the mobile menu with my main menu and tried to navigate via mobile in order to see the results on canonical URL. They didnt update.
Please Log in or Create an account to join the conversation.
Once the canonical URL is filled in the categories, it won't be updated. It will only be set if the field is empty in the categories.
Also, then main category from your main menu items won't be filled since they are only displayed in a listing by via a menu module.
So you'll have to fill them manually.
Please Log in or Create an account to join the conversation.
Updated I mean from empty string to the right path. I have cleared the canonical urls via mass actios, before navigate. Also, when I see that a category has a mobile url I delete that as well.
Please Log in or Create an account to join the conversation.
I think I know why this doesn't work for you.
You have sub menu items with the categories and in that case, the system directly use the URL of the sub menu item corresponding to the category, which skips the generation of the URL process where the canonical URL is generated if missing.
Change the code:
Let us know how it goes so that we can add that patch on our end too.
Please Log in or Create an account to join the conversation.
Now it generates the path.
But in my case it is not the right one.
I go that: /index.php/hikashop-menu-for-module-131/category/analosima-grafeiou
When I want the path from the menu.
Thank you in advance.
Please Log in or Create an account to join the conversation.
I don't see how that could be the case since this code saves the URL from the sub menu item.
Could you please double check ?
Please Log in or Create an account to join the conversation.
I am sorry, I double check and everythig is fine now.
The path is the right one.
Thank you very much nicolas!
Please Log in or Create an account to join the conversation.
How can I manage a product's Canonical URL, which product will be set in two different categories? I added one product in a different category and it points in the path that is set in the product, of course.
Thank you in advance.
Please Log in or Create an account to join the conversation.
Canonical URLs do not change anything regarding that.
It's only if you activate the "force canonical URLs on listings" setting of the HikaShop configuration that the canonical URL of the product will be used everywhere.
If you don't want that, you should turn off that setting. That way, the URLs to access the product page will be different, but the indexed URL for search engines will still be the canonical URL (and you won't have issues with SEO).
Please Log in or Create an account to join the conversation.
I tried to turn off the option about canonical URLs, but the current products display error in the fron-end so I turn it up again.
Please Log in or Create an account to join the conversation.