-
Notifications
You must be signed in to change notification settings - Fork 25k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SEO: Online Shop wrong category linking to products #12532
Comments
You can use website_canonical_url from OCA: https://github.com/OCA/website/tree/9.0/website_canonical_url for this. @JKE-be is there any improvement about this for v12? I consider this one important. We can make the PR to master if you want starting from the OCA module. |
@JKE-be any update on this one? :) |
We plan some update for v13 but I just take a look to the linked module, and we will do less than that. Imo, the canonical url of /blog?page=2 is not /blog ... (only for page1) but yes /product/1?xxx=eee ==> should have /product/1 as canonical url |
cc @yajo |
At the time of writing the module, I found no odoo controller paginating with The case you say is no exception, as the blog controller is paginated with |
Hi @yajo Not Wrong... But if we take for example event, While it should be probably indexed imo, no ? |
In this case, the categories and countries are not canonical IMHO. They just repeat information that can be found in the same controller without that filter, and would lead to duplicate content errors. The only parameter that actually makes you see events that are impossible to see without it is Possible solutions:
|
not really sure imo, if /shop (with pagination[ /shop/page/1], and with sort by name)... From what I understand here: https://tools.ietf.org/html/rfc6596#section-3 But yes, maybe we could use a heuristic as in your module, and after allow by controller to make it specific. But need to be triple check : avoid to loose referenced page VS penalties for duplicate content. |
Hmm I think that you're not understanding what the canonical URL does (or maybe it's me 😆). AFAIK, the canonical URL indicates what should be the "main" URL indexed by search engines in case a engine lands in the present page. So yes, there's the possibility that if you search for "rocky" in a movies shop, some items found in page 2 are not actually found in page 2 of the same controller without the search term, but the canonical instruction would be telling the search engine:
Of course, there are chances that the search engine doesn't find any "rocky" titles in that page, but there's one thing it will find: pagination links. The search engine then will crawl all those links and index all movies, including the rocky ones. Then somebody goes to the search engine in question and searches for "rocky movie". That person might get a result in After all, the best is that the person lands directly from the search engine to the product page itself, but if he ever lands in the products list, then it should be directly in the list itself. The user can then click on any product or use the filters by himself. Keep in mind that search engines give your site a time & pages budget, depending on its update rate and the interest people show in it (so it's not under your control). If you spend all that budget indexing the same products list over and over under different filters, the bot might run out of budget and skip the product page itself, which would actually be the most interesting one. That said, it might be interesting to index product categories; since they are part of the URL itself in Odoo, it would work out of the box. Yes, there could be duplicated content, but in this case it's valuable to have it, so the canonical URL is different. |
not really, I think that I'm not sure about all what we can read ;) and look for the best explication with other people instead to apply mine opinion like the only one that is correct ;) Yes, for the search, I'm sure, I think like you ... We should use canoncial. But for example /shop?order=best_seller, and /shop?order=rating, not sure that we want these 3 pages with the canonical to /shop like you suggest ;) What you are not really agree. So still looking for others sources that help me to make the best choice ;) Nothing against you, or against me ;) just want to avoid to take one more bad decision... |
don't worry, it does'nt start from scratch every time, so after a few day, you will have all your content ;) even the 2 (potential useless) pages |
The canonical tag is important for SEO, indeed it prevents search engines from indexing duplicate content. Reasoning ========= The choice has been made to create the canonical tag automatically depending on the request path, ignoring the query string, and manually prefixing the appropriate domain and language code. Indeed creating it manually for each resource would create a lot of code and potential mistakes. It is more dangerous to do it the generic way, but after investigation it appears that it is an acceptable trade-off since the vast majority of our routes are well built and already ready for this: - using query string only for minor features that do not change the main content - having the models, the ids, the pager and other important features in the path Override ======== It is still possible to override the default behavior by passing `canonical_params` manually to the view or to the different methods. This is done for `/event` because the only way to display Past Events is to add `date=old`. Languages ========= Fix an issue where it was possible for a bot to be on the URL without language code but to use a language that is not the default language. Adapt hreflang, because it: - must only be present on canonical pages - must always lead to canonical pages - should not be set if there is no alternate language Misc ==== task-1958075 closes odoo#12532 Inspired by OCA module `website_canonical_url` courtesy of Jairo Llopis. Co-authored-by: Jairo Llopis <jairo.llopis@tecnativa.com> Co-authored-by: Sébastien Theys <seb@odoo.com>
The canonical tag is important for SEO, indeed it prevents search engines from indexing duplicate content. Reasoning ========= The choice has been made to create the canonical tag automatically depending on the request path, ignoring the query string, and manually prefixing the appropriate domain and language code. Indeed creating it manually for each resource would create a lot of code and potential mistakes. It is more dangerous to do it the generic way, but after investigation it appears that it is an acceptable trade-off since the vast majority of our routes are well built and already ready for this: - using query string only for minor features that do not change the main content - having the models, the ids, the pager and other important features in the path Override ======== It is still possible to override the default behavior by passing `canonical_params` manually to the view or to the different methods. This is done for `/event` because the only way to display Past Events is to add `date=old`. Languages ========= Fix an issue where it was possible for a bot to be on the URL without language code but to use a language that is not the default language. Adapt hreflang, because it: - must only be present on canonical pages - must always lead to canonical pages - should not be set if there is no alternate language Misc ==== task-1958075 closes #12532 Inspired by OCA module `website_canonical_url` courtesy of Jairo Llopis. closes #35852 Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com> Co-authored-by: Jairo Llopis <jairo.llopis@tecnativa.com> Co-authored-by: Sébastien Theys <seb@odoo.com>
Closing as fixed at #35852 |
Impacted versions
Goal
Linking all navigation must always refer to the original URL of a product. This concerns the category links in the online shop.
Reason
If there are multiple URLs for a product, we have duplicate content.
It may be that a product page can be reached at multiple URLs in the search engines. For this reason, duplicate content by search engines is very poor rates.
Current behavior Odoo 9
The categories refer to ODOO Online Shop wrong product URLs. This new pages are generated, which then appear in the index of search engines.
Steps to reproduce:
Correct: shop/product/imac-11
Wrong: shop/product/imac-11category=12?
Expected behavior
The products in the online shop must in the various navigation (categories) always point to the original URL.
This information is available
#12527
The text was updated successfully, but these errors were encountered: