VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: mauriziomomix on May 28, 2022, 01:09:43 AM

Title: Strange routing results: every url goes ok
Post by: mauriziomomix on May 28, 2022, 01:09:43 AM
Hello,
I noticed, working on a recent project, that the URL of a product was accepting any casual string in the middle part of it.
After some tests on several installations, I just checked the official Virtuemart demo and the result is the same: if you point to a product you can alter the URL (which means endless duplication) but the product is still visible.
Here is a proof:
http://demo.virtuemart.net/h20-jacket-detail (real product URL) that is also visible on
http://demo.virtuemart.net/300000/h20-jacket-detail
http://demo.virtuemart.net/random/h20-jacket-detail
http://demo.virtuemart.net/kennedy/h20-jacket-detail
http://demo.virtuemart.net/whatever/h20-jacket-detail
and so on...
I don't think this is normal or wanted behavior. It seems more likely to be unwanted.
Any opinion about this?
Thanks in advance
Maurizio
Title: Re: Strange routing results: every url goes ok
Post by: pinochico on May 28, 2022, 08:03:50 AM
We have seen similar behavior with URLs when generating URLs for Joomla articles.
If you keep the article ID in the URL, you can type anything in the resulting URL and the article will be displayed.

To fix the core Joomla article URL generation bug (this bug has been known for many years) we have programmed a new plugin
plg_system_articleredirect

But the important thing is that you have the correct canonical URL:
- only one URL is the main
- other URLs will not be taken into account for indexing


Translated with www.DeepL.com/Translator (free version)
Title: Re: Strange routing results: every url goes ok
Post by: mauriziomomix on May 28, 2022, 14:32:16 PM
Hello pinochico, thanks for your reply.
I didn't know about a similar behavior for the article urls too. It means it isn't, or not only, due to Virtuemart, I think.

But in your opinion, I see that there is no risk of negative SEO consequences.

Thank you very much,
Maurizio
Title: Re: Strange routing results: every url goes ok
Post by: pinochico on May 28, 2022, 18:07:59 PM
QuoteI see that there is no risk of negative SEO consequences.

the opposite is true

content that has an infinite number of URLs and does NOT have a properly set canonical URL is duplicate and is penalized == very bad for SEO.

Unfortunately, the canonical URL is not a standard part of Joomla and I'm not sure if it is part of the core VM

We therefore use an external plugin and check in the sitemaps application.
Title: Re: Strange routing results: every url goes ok
Post by: jenkinhill on May 28, 2022, 18:17:12 PM
@mauriziomomix  Canonical URLs are automatically produced by VirtueMart - eg for the Cowboy hat product detail page on the VM demo near the head of the cde you will see:

<link href="http://demo.virtuemart.net/cowboy-hat-detail" rel="canonical" />
Title: Re: Strange routing results: every url goes ok
Post by: mauriziomomix on May 28, 2022, 19:46:22 PM
Thank you Pinochico and Kelvyn for your useful help.

I see that even modifying the URL, the canonical remains the same, so there is no risk to be penalized.

Thank you very much
Maurizio