I’m very new to Magento and please excuse me if this has been answered before but I’ve searched the forum and can’t find the answer.
I’ve created my products and assigned them to categories and with some products I have had to assign them to multiple categories. I have set in the configuration “Use categories path for product URLs” as well so my products read something like http://mystore.com/blu-ray/name-of-blu-ray.html
This is NOT the effect I want! From an SEO point of view I will end up with the same content on my site being available on several URLs.
Ideally the best solution to this from my point of view would be for me to be able to set a primary category for the products when I use multiple categories, and then the search results should point to that primary category. So for example my product - prince-capian.html (Blu-ray) - could be accessed via the category menu by navigating to http://mystore.com/blu-ray/disney/prince-caspian.html and http://mystore.com/blu-ray/childrens/prince-caspian.html but in this instance Disney could be the primary category for search results and will always direct there from the search. And for the content appearing on multiple pages, it would make sense to use link rel="canonical" href=’http://mystore.com/blu-ray/disney/prince-caspian.html” on the version that appears in the children’s category.
Also it should be noted that when you arrive at a product from the search - without navigating through the categories - the breadcrumb ignores the category level so reads Home / Product Name and the navigation is no longer highlighted with the category I am in - presumably because I am not in a category!
If anyone thinks this is the correct behaviour, then they should look at this forum. When I search for a thread and click into it, the breadcrumb shows exactly what thread and part of the forum I am in. I would expect the same from the shop search. The categories should be part of the full URL.
Does anyone have any solutions on how to fix this?
Same issue here - I’ve been looking for a solution to this. I would love to have an option whereby we can set the ONE primary URL for each product (I prefer the URL with category paths so that categories are included in breadcrumbs).
The canonical url extensions fixes the SEO issue, but my primary concern is the user experience as well.
When searching or using featured products mods, etc. they always link to http://www.domain.com/product.html without ANY reference to the product category. It’s also the same with links from the shopping cart or anywhere else. As long as the product wasn’t found by navigating categories, it doesn’t have the proper breadcrumbs and category path URL. I think this is a major problem.
By default this is not possible because a product can be in many categories. So if you go to any product via Search, there is currently no way to tell which category out of the multiple categories is the main category.
I am sure till here everyone knows. For solution, I can just tell the quickest logical way as giving the coding solution would be too time consuming here.
1. Include an attribute with each product. It can be just a textbox. This should be used to enter a category id, i.e., the primary category id.
2. On the front end, which user clicks on to view a product, an observer needs to be kept on the predispatch product view. This checks if the product is being views through any category. If not, then it checks if the primary-category-id has been defined. If yes, then modify the product url to include the category.
Again, this just my 2 cents about the logical implementation. I don’t see any problem in implementing it in code form as well. I have would have given the solution here if it was 10 min job.
Contact me if anyone would like to get this solution done for them.
We have been having this problem as Magento uses the flat url (without categories) as the default url sitewide for the product. We agree this should be in the core solution which is available in other products as most stores only have one category per product. One our clients were so desperate to find a solution to this they were willing to be billed almost 100hours of developer time to find a fix. We tested multiple ways to do this with 100s of combinations, and in the end we only found *one* solution that worked, it was a nightmare.
There are various restrictions such as only being tested on 220.127.116.11 and it can only use a random category or the first one found (there is no way to select which category has priority due to the number of combinations). It does however work with the sitemap generator, is mutli-language/store friendly and also gets around the duplicate content problem.
It is best if you can structure your site to work around the problem with directed content and use canonical urls to remove duplicate page issues, however if this is critical for anyone we can discuss if we can release this solution selectively.
I’m having this problem too and it is a critical issue.
I have products that fall under several categories. Some products fall under 4 or more categories.
This means that each of these product has 4 links, so 4*4 = 16 links for only 4 products!
I am afraid that Google will not accept this kind of replication in pages contents.
Is there anyway to solve it? I don’t want to see my store banned from Google..
Magento is really not ideal from the point of view of SEO. Very many obvious functions are implemented not quite right. As a variant, you can try the ready extensions. For example, I use this one http://mirasvit.com/magento-extensions/advanced-seo-suite.html and very satisfied with results. There are a lot of similar extensions.