Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Search results product URL and multiple categories
 
The Haunted Fish Tank
Jr. Member
 
Total Posts:  1
Joined:  2009-04-22
 

Hi

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

When I search for my products in the front-end, the link in the search results just reads http://mystore.com/name-of-blu-ray.html.

Not only is this incorrect as I asked to use the category path for the product URLs but I can see this causing a problem with some products I have which will have the same name but be under a different category. For example I should be able to have http://mystore.com/blu-ray/name-of-film.html and http://mystore.com/fbooks/name-of-book.html e.g. http://mystore.com/blu-ray/prince-caspian.html and http://mystore.com/books/prince-caspian.html but the search results will give me http://mystore.com/prince-caspian.html and http://mystore.com/prince-caspian-1.html for the two versions.

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?

Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
Tomakun
Sr. Member
 
Total Posts:  77
Joined:  2008-10-21
 

Very same concerns here. From an SEO point of view it is quite bad too.
Can anyone point us to the right direction, or explain to us how to set that correctly?

 
Magento Community Magento Community
Magento Community
Magento Community
 
ph23man
Jr. Member
 
Total Posts:  14
Joined:  2007-08-31
 

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.

 
Magento Community Magento Community
Magento Community
Magento Community
 
MrSparkle
Jr. Member
 
Total Posts:  8
Joined:  2009-07-01
 

Is there any solution to this issue yet?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Logi7
Jr. Member
 
Total Posts:  8
Joined:  2010-01-08
 

I’m also having this problem

 
Magento Community Magento Community
Magento Community
Magento Community
 
Shahid Sarvani
Member
 
Avatar
Total Posts:  63
Joined:  2009-08-05
 

I am also having same problem...Anyone has answer or some clue on this?

 
Magento Community Magento Community
Magento Community
Magento Community
 
johannelim1902
Jr. Member
 
Avatar
Total Posts:  4
Joined:  2009-09-10
San Juan, Pilipinas
 

I can’t help but agree that I’m on the same boat as everyone else on this thread.

Any resolutions please stand up!  grin

 
Magento Community Magento Community
Magento Community
Magento Community
 
Cubix WS
Guru
 
Avatar
Total Posts:  318
Joined:  2009-07-01
LondON, United Kingdom
 

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.

For eg: prince-caspian can be under categories blu-ray, can be under films, can be under children entertainment. So if someone searches for Prince Caspian and click on the product, Magento will not know whether to show http://www.example.com/blu-ray/prince-caspian/ or http://www.example.com/fims/prince-caspian/ or http://www.example.com/children-entertainment/prince-caspian/

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.

Cheers

 
Magento Community Magento Community
Magento Community
Magento Community
 
Magento Support Service
Jr. Member
 
Total Posts:  13
Joined:  2010-11-07
 

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 1.4.1.0 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.

MagSupportNet

 
Magento Community Magento Community
Magento Community
Magento Community
 
Ala1
Jr. Member
 
Total Posts:  14
Joined:  2009-10-04
 

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 Community Magento Community
Magento Community
Magento Community
 
idealclic
Jr. Member
 
Total Posts:  24
Joined:  2010-10-11
 

Here is another issue that you did not mentionned:

For my site I have a custom design for each main category, without using the full url path, the custom design is not displayed as well as the left nav sub categories.

Really need to find a fix for that.

If anyone has find a way to retrieve the full url from related products and search results, I would love it!

 
Magento Community Magento Community
Magento Community
Magento Community
 
privera
Jr. Member
 
Total Posts:  2
Joined:  2012-12-03
 

Hello guys!

If you go to System ->Configuration->Catalog->Search Engine Optimization

And look for the option

Use Categories Path for Product URLs choose no… Magento will generate only one URL for the products!

 
Magento Community Magento Community
Magento Community
Magento Community
 
caitlingokey
Jr. Member
 
Total Posts:  1
Joined:  2013-09-17
 

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 Advanced SEO Suite http://mirasvit.com/magento-extensions/advanced-seo-suite.html and very satisfied with results. 



 
Magento Community Magento Community
Magento Community
Magento Community
 
Xedios
Member
 
Avatar
Total Posts:  42
Joined:  2009-08-19
Lancaster, PA
 

Hello guys!

Our Magento SEO was going well, even with the horribly complex infrastructure. June 2013 changed all of that. We took a big hit with Google Penguin 2*. We are in the process of digging out of the ditch.

We are using CE 1.7.0.2 and under Configuration > Use Categories Path for Product URLs > No

Under Google Webmaster Tools > HTML Improvements > Lots of Duplicate Content Issues

Here is one example:

http://www.shaggymax.com/macbook-pro-swiper-15.html
http://www.shaggymax.com/laptop-screen-protector/macbook/macbook-pro-swiper-15.html

Do we need to clear out old url Rewrite Rules? Any advise on how to improve SEO without an extension would be greatly appreciated!

To my knowledge CE 1.8 does not address SEO ....maybe load times are better smile

Cheers,
Dimitri

 
Magento Community Magento Community
Magento Community
Magento Community
 
ScommerceMage
Sr. Member
 
Avatar
Total Posts:  103
Joined:  2013-12-27
United Kingdom
 

Hi Guys,

This module will resolve this problem for you

http://www.scommerce-mage.co.uk/magento-extensions/magento-seo-catalog-urls.html

Here are the main features of this module-:

- One primary category for products which are there in multiple categories.
- Permanent redirects (301) if you explicitly remove category path from the URL
- Permanent redirects (301) if you explicitly add non-primary category in the URL
- Primary category will be used in the URL for each and every section of the store including cross sells, up sells, relative products, basket link, search, advance search etc.
- It also resolves duplicate content issue problem for your site as search engines will find one unique url for each product instead of multiple urls
- This module can be completely disabled whenever required via system configuration in admin

 
Magento Community Magento Community
Magento Community
Magento Community
 
Amasty
Mentor
 
Avatar
Total Posts:  3988
Joined:  2009-11-10
 

Hi there,

I recommend you taking a look at this extension: http://amasty.com/magento-unique-product-url.html. It effectively combats duplicate content by enabling you to set the unique product URL for each product placed in multiple categories. Moreover, the module allows choosing the URL path for each product either the shortest or the longest one. At the same time the product will remain accessible from all the categories where it’s added to.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top