News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

$product->link is not canonical

Started by hazael, November 01, 2022, 12:45:13 PM

Previous topic - Next topic

hazael

$product->link
This variable needs to be improved. Links are not canonical and they are not SEO compliant. This variable generates duplicates depending on the category to which the product is added.
If a product falls into 10 categories, then the same product has 10 different URLs. This is called spam.

J4 / VM 4.0.7 10730

Milbo

No, please do not spread halfway knowledge. Search for "canonical URL" and how to set a canonical URL. Then you will notice that VM sets a canonial URL, which is not stored in $product->link.

If a product has 10 different categories, you get 10 different URLs, and one of them is the canonical URL. Read the product edit, first tab.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

hazael

#2
You have an interesting theory, but I prefer to have one link with one canonical category instead of 100 links to the same content with different categories. Who needs it?
You write all the time that you are working on Virtuemart's performance, and this solution is very suboptimal. Your solution clutters the database terribly. You think about Virtuemart, but you don't think about the other components that have to deal with it.

A perfect example of such a problem is the component "Ro CSVI". I want to export my products to Google Ads in the amount of 400 items. For this to happen, this component must add all duplicate URLs to its table. With such exports, many people have certainly seen the ERROR 500. Wyhy? Because with one operation the table #_csvi_sefurls must add tens of thousands of duplicate URLs...

Another example is components of the type 4SEF - databases are overloaded with duplicate links.

QuoteThen you will notice that VM sets a canonial URL, which is not stored in $product->link.
CanonCat / Force canonical category - It's just a hoax.  Where is this canonical link stored?
I had to rewrite your template changing $product->link or $product->category_id everywhere to $product->product_canon_category_id




Milbo

omg, man, read the already existing posts about this topic and there are a lot. and this are not my theories,...
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

hazael

I know these rules perfectly, but you probably don't read me to the end

PS.
This forum also has problems with optimal work - every 15 minutes this annoying message ;-)
Why am I the only one seeing mistakes everywhere? it's probably a curse  :-\

jjk

Quote from: hazael on November 01, 2022, 12:45:13 PM
If a product falls into 10 categories, then the same product has 10 different URLs. This is called spam.

Sorry, but you are wrong. It's absolutely normal for many ecommerce shops and Google does NOT consider that as spam and does NOT penalize it.
See for example: https://developers.google.com/search/docs/crawling-indexing/consolidate-duplicate-urls
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

stAn99

You can modifiy product->link across all VM templates if you do not want to navigate into current category, but rather use product's canonical category.

VM tries to use current category so that the menu (and highlighted path shown to customer) is not changed upon the navigation. If you chnage it to canonical category, then you will end up in a completely different menu and/or category tree.

I usualy modify it at all templates so it's always canonical, then i use plugins to force canonical (even with a redirect), and i always print canonical to the page (controlled by templates or plugins) and within the sitemap generators i always make sure that it's using only canonicals.

What you are requesting is a "feature request" to force product->link to be always a canonical URL and i would agree with such a feature.

As far as you use the canonical in head or headers you will not get penalized by google, but you might get penalized for "crawl budget" if there is way too many URLs.

Best regards, Stan

----
RuposTel.com
www.rupostel.com
Your customized checkout solution for Virtuemart

hazael

#7
Quote from: jjk on November 02, 2022, 11:57:28 AM
Sorry, but you are wrong. It's absolutely normal for many ecommerce shops and Google does NOT consider that as spam and does NOT penalize it.
I'm not talking about spam on Google, Bing, etc I mean spam in the database.
If Google doesn't like spam in its database, why should I like spam in my database?
Of course, I partially solved this problem myself, but I do not understand why Milbo officially publishes such templates
The same product generates different non-canonical categories ids. The best part is that the same product can also have different Itemid, which depend on other parts of the page. This generates additional spam.

Search engine optimization is not only about text and links. Positioning is also the performance of the website

hazael

#8
Quote from: stAn99 on November 02, 2022, 13:02:04 PM
What you are requesting is a "feature request" to force product->link to be always a canonical URL and i would agree with such a feature.
Yeees, that's exactly what I'm writing about. Big beer for you! :)

Each non-canonical link is saved to the database, each non-canonical link is added to the memory cache. This solution heavily overloads the server, consumes more RAM and CPU. WebCrawlers additionally overload the server.
Spam is like the flu - prevention is better than cure  ::)