News:

Looking for documentation? Take a look on our wiki

Main Menu

Remove duplicate URL / Standardize Products URL

Started by conankun, June 10, 2013, 13:06:25 PM

Previous topic - Next topic

conankun

How do I prevent a product to have multiple urls if I assign multiple categories to it?

Example. let say I assigned product "ABC" to "Keyboard", "Digital Piano", and "Musical Instruments" and so I end up with 3 urls to the same product
- http://mysite.com/products/musical-instruments/keyboard/abc
- http://mysite.com/products/musical-instruments/digital-piano/abc
- http://mysite.com/products/musical-instruments/abc

How do I make it so the URL always is http://mysite.com/products/musical-instruments/digital-piano/abc regardless where I enter it from.

This is to reduce confusion, to make it clear to customer what category it actually belongs to, and to avoid getting penalized by search engines like Google for having multiple URLs.

Or better still, is it possible through virtuemart or htaccess rewriting or other methods to default all products URL to http://mysite.com/products/product-name so in this example it would be http://mysite.com/products/abc

Few info that might help:
- I'm using Joomla 2.5.9
- I'm using Virtuemart 2.0.20b

Milbo

Please use the latest http://dev.virtuemart.net/projects/virtuemart/files 2.0.21 (D).

The canonical links are fixed there, so you dont get a penalty. Of course the actual category is used, that is desired, for example to change the template, use another layout and so on.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

conankun

#2
Updated my Virtuemart to 2.0.21d but all the three links are still accessible and the linking is still the same too.

If I click on Keyboard (Musical Instrument > Keyboard), the link to the product is https://www.primanada.com/produk/alat-musik/keyboard-piano-dan-organ/yamaha-dgx-660
If I click on Musical Instrument, the link to the product is https://www.primanada.com/produk/alat-musik/yamaha-dgx-660

What I hope is that all those links be either:
https://www.primanada.com/yamaha-dgx-660 or https://www.primanada.com/produk/alat-musik/keyboard-piano-dan-organ/yamaha-dgx-660

Can anyone lead me to the file where I should edit or the solution to this?

Milbo

ehrm, conankun.

That is exactly the TRICK that you can acccess it via different links. In fact there exists with SEF activated almost endless links for one product. This is a feature, not a bug. We use the canonical link correctly, so even you can access it with different links, the search engines know that it is just an alias, because it is announced in the code. Therefore the search engines LIKES it.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

AH

Regards
A

Joomla 4.4.5
php 8.1

conankun

Ah.. Cool thanks.

I have another question on pagination where when I go to page 2 of product categories, it often (not always) remains at page one (although it already has ?start=8). But I'll open up a new thread for that soon.

AH

Regards
A

Joomla 4.4.5
php 8.1

tonis

#7
Hello

I dont think this is a good feature...

What about the social buttons on product? They dont read the canonical url ... so you split likes to more urls if the product is in more categories.

And the same with the social comments - the comments for one product splits to more urls, this is a big problem I think ...
For example, I have disqus comments on products, and if the product are in more categories, the comments splits to more url ....

also when I add categories to menu items, it mess up the breadcrumbs ...

and also, the urls are somehow "slowed", I acces the product form category 1 - it shows url from category 1, then I acces product from category 2, it shows url for the category 1, then I acces it form category 3 and it shows the url from category 2


It would be much better if it works the old way ... to display the product on the category with the lowest id ...  How can this be changed?

AH

You don't think canonical urls is a good feature, I have to disagree and so do google!

http://googlewebmastercentral.blogspot.co.uk/2009/02/specify-your-canonical.html

Social buttons are plugins and should be sorted out by the creator of the plugin - this is not a VM issue. Talk to the plugin provider.

Yes there are multiple urls if in multiple categories

Post your problem regarding breadcrumbs as a seperate query and detail the VM version and exactly your problem. "messes up" is not going to get much response

Regards
A

Joomla 4.4.5
php 8.1

tonis

sorry, I dont say it is a VM issue ... I only describe the issues that comes along with it

it was only a statement, I expressed wrong ... I want only to point if it is a necessarily feature for VM


I described the problem here
http://forum.virtuemart.net/index.php?topic=121118.msg413163#msg413163

FidelGonzales

I realize this matter has been rehashed upon multiple threads with no apparent solution beyond the use of conical URLs. But is there a method to remove the category from within a product page URL? For social sharing buttons, a single share (or like) on four duplicate page URLs is less likely to go viral than four shares (or likes) on one page URL. Within the Facebook environment, sharing four different pages is less effective to its algorithm, versus when four different people share the same page. Furthermore, four people sharing a single page takes up more real estate upon a person's wall.

CHANGE THIS
mysite.com/shop/category-1/part-1
mysite.com/shop/category-2/part-1
mysite.com/shop/category-4/part-1
mysite.com/shop/category-5/part-1

TO THIS
mysite.com/shop/part-1

AH

The category in the URL for a product can be very useful for attracting links and searches

This has been discussed many times

Some people will really want it to have the category when they have multiple categories

If you item does not fit in a single category surely you want people to be able to find that item based on what THEY think it should be described as (Thats why you put it in multiple categories in the first instance , it did not fit perfectly into a single category)

Removing the category will restrict how a product will be indexed by google and thus "longer tail" searches will not return your item

Maybe someone will post a hack, and maybe it will end up as an option in 2.1

But do you really want to reduce your possible hits?

Regards
A

Joomla 4.4.5
php 8.1

FidelGonzales

Thank you for your reply. A configuration option would be ideal.

I understand the potential benefit of long tail searches through the use of multiple URLs. But when considering the aforementioned duplicate URLs concerns, the benefit is relatively small.  SEO copy writing can overcome this quite well. Perhaps the addition of text links back to the categories where the product is published would also be a wise move. This would be used similarly as the "Back To: (Category)" link is used but instead using it more as a tag. It would be interesting to know if publishing a link to the categories where a product is published can be easily done.

There is such an option to eliminate categories from the product URL in Magento. For a 10,000 product database, most products were published in a minimum of three categories with the average being approximately 4.5 (per memory). When switching the option off, the traffic suffered for just over a month but saw an increase in organic traffic just over two months afterward without any additional modifications to the site. The improved load upon the server was noticeable per the logs.

Milbo

You can disable the categories in the router.php yourself. VM needs only the product-slug with the suffix (default is -detail)
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

FidelGonzales

Thank you for the advice. I now recall doing this in VM1. I've made multiple attempts here in VM2, removing code from the router.php file. Do you know of any threads or tutorials or have advice to accomplish the desired result?

Some of my experiments on the matter are here: http://mediaarmory.com/forum/229-virtuemart/91517-virtuemart-2-router-php-sef-url-modifications

Thank you.