- Posts: 135
- Thank you received: 3
Canonical URL not used
- simonkloostra
-
Topic Author
- Offline
-- Joomla version -- : 3.3
-- PHP version -- : 5.3.28
-- Browser(s) name and version -- : All
-- Error-message(debug-mod must be tuned on) -- : None
I created a new site with Hikashop installed, and I want to avoid duplicate URLs as much as possible. I have set "force canonical URLs on listings", and also added a canonical URL (webshop/product/strassburg-sock) for one of my products, but different canonicals are generated depending on how I access the product:
- From the shop (product-listing menu), I get the URL webshop/product/strassburg-sock, which has canonical webshop/product/strassburg-sock (same), which is also the canonical I created in the product configuration.
- From the Hikashop Content module on the homepage I go to URL component/hikashop/product/strassburg-sock, with also this canonical. Apart from the fact that the canonical URL does not seem to be created as wished, I would also like this link to go to the main URL for the product, as it also is a location which does not reflect the correct module positions.
Please Log in or Create an account to join the conversation.
The canonical url is unique, it is added in the meta data of the page, so for the seo there is no problems.
Now for a better sef experience, you have to edit the content module "menu" option in order to select a menu with the desired url
Please Log in or Create an account to join the conversation.
- simonkloostra
-
Topic Author
- Offline
- Posts: 135
- Thank you received: 3
Then about canonical URLs: Even though the products from the module are routed to the correct page now, the original URL still exists, being:
xxx.xx/component/hikashop/product/strassburg-sock , with the following canonical URL:
<link href=" xxx.xx/component/hikashop/product/strassburg-sock " rel="canonical" />
The 'correct' page for the product is xxx.xx/webshop/product/strassburg-sock , with this canonical:
<link href=" xxx.xx/webshop/product/strassburg-sock " rel="canonical" />
This means 2 almost similar pages on 2 URLs. For SEO purposes, they should have the same canonical, right?
Please Log in or Create an account to join the conversation.
Which value do you have selected for the option "force canonical URLs on listings" ?
You should have: "Use canonical URL and generate it if missing", this way if a canonical url exist, it take it, else it is generated. But there is only one url for one product.
Please Log in or Create an account to join the conversation.
- simonkloostra
-
Topic Author
- Offline
- Posts: 135
- Thank you received: 3
Please check my test-site. I have 2 URLs for the same product:
xxx.com/component/hikashop/product/strassburg-sock
http:/xxx.com/webshop/product/strassburg-sock
Both URLs are for the same product. The first one is nor really in use, it is not linked from a menu or so, but it is definitely an existing URL, and a case of duplicate content. If the canonical URL would be used (I configured it to be/webshop/product/strassburg-sock), it would not be an issue, but the canonical URL for this URL is a different one, please check the source code for the 2 URLs.
Please Log in or Create an account to join the conversation.
Edit your module via the menu Display>Content modules and set the "menu" option to your "webshop" menu item. That should automatically solve the problem.
Please Log in or Create an account to join the conversation.
- simonkloostra
-
Topic Author
- Offline
- Posts: 135
- Thank you received: 3
The URL I have issues with is not directly accessible via any menu or module, so for my users I have no issues. My issue is that, even though the URL xxx.com/component/hikashop/product/strassburg-sock is not directly accessible, it is still around, and Google will for sure find it when indexing the site.
Also I do not mind that is there, as long as the canonical URL for the page would point to the correct one: xxx.com/webshop/product/strassburg-sock
As this is not the case, it will be indexed as a separate page with duplicate content.
Please Log in or Create an account to join the conversation.
- simonkloostra
-
Topic Author
- Offline
- Posts: 135
- Thank you received: 3
Please Log in or Create an account to join the conversation.
- simonkloostra
-
Topic Author
- Offline
- Posts: 135
- Thank you received: 3
Please Log in or Create an account to join the conversation.
Sorry for the delay.
You can't prevent a valid URL from working. That's why the canonical URL system is in place so that Google knows the main URL of the product.
I wanted to look at your links in order to try to find more clues, but there is a htaccess blocking the access.
And looking at our code, there is no reason the canonical URL on the product page wouldn't be the one you entered in the product edition interface. So the only things I could think off would be that you don't have the correct URL in the canonical URL field of the product or that you have some caching on your website which prevents you from seeing the correct canonical URL in the header of the page.
Please Log in or Create an account to join the conversation.
- simonkloostra
-
Topic Author
- Offline
- Posts: 135
- Thank you received: 3
Please Log in or Create an account to join the conversation.
Could you provide a backend access and a FTP access so that we can check your settings and put some traces in the code in order to analyze what's going on on your website ?
You can use our contact form in order to provide that along with a link to this thread:
www.hikashop.com/support/contact-us.html
Please Log in or Create an account to join the conversation.
- simonkloostra
-
Topic Author
- Offline
- Posts: 135
- Thank you received: 3
Please Log in or Create an account to join the conversation.
So from what I can see, the problem is actually not in HikaShop.
HikaShop actually always display the correct canonical URL. If you look in the header of the product page, you'll actually see two canonical URLs. The correct one, added by HikaShop, and the wrong one, added by the system SEF plugin of Joomla.
If you disable that plugin, then you only get the canonical URL from HikaShop on the product pages.
It seems to be a common problem with that plugin from what I could find online:
forum.joomla.org/viewtopic.php?f=712&t=833986
Please Log in or Create an account to join the conversation.
- simonkloostra
-
Topic Author
- Offline
- Posts: 135
- Thank you received: 3
Since Joomla cannot "know" that a component generates it's own canonicals, you cannot blame it for generating one, right? So I guess that this is something that should be looked at by Hikashop?
On the practical side, I will probably reroute the incorrect URLs using a 301-redirect (either in Joomla, or using SH404SEF). Since my shop does not have many products, that is no problem.
Please Log in or Create an account to join the conversation.
HikaShop has no way of stripping out Joomla's canonical URL tag as Joomla adds it with a system plugin on the page, at the very end of the processing of the page and HikaShop has no control on the page after it.
On the other end, the Joomla plugin has all the luxury to check on the HTML of the page and not add its canonical URL tag if there is already one there. If will avoid the problem for HikaShop, but also for all the other extensions where this creates a problem.
It is also not a big problem for ecommerce websites since what you need is canonical URLs on your HikaShop products/categories. And if you want canonical URLs for your joomla articles/categories, there exist plugins for Joomla specialized in that which don't mess with the pages of other components.
So just don't use that plugin until it gets fixed.
Please Log in or Create an account to join the conversation.