简体   繁体   English

如何修复magento中的LONG网址以进行分层导航。 SEO实践

[英]How to fix LONG urls in magento for Layered navigation. SEO Practice

According to some SEO Practices having long URL is not good. 根据一些SEO惯例,URL太长是不好的。

Magento uses layered navigation and when you have lots of attributes then the URL becomes very very long. Magento使用分层导航,当您具有许多属性时,URL会变得非常长。

I can not put an URL here because the moderatos say its too localized. 我不能在此处放置URL,因为主持人说它太本地化了。

I just wanted to know if this is possible to fix using any kind of code? 我只是想知道是否可以使用任何类型的代码来解决? As I am not an expert on magento or php, I can not provide any code because I dont even know where should I start looking for to fix this. 由于我不是magento或php方面的专家,因此我无法提供任何代码,因为我什至不知道我应该从哪里开始寻找解决方法。

Somebody suggested editing filter.phtml and put rel=nofollow. 有人建议编辑filter.phtml并将rel = nofollow放进去。

Is it a good practice? 这是一个好习惯吗? Is it recommended that search engines dont crawl those pages that are related to layered navigation? 是否建议搜索引擎不要抓取与分层导航相关的页面? Another problem they have is that the title and description its always the same. 他们遇到的另一个问题是标题和说明始终相同。

Thank you very much for your post, for help I created a module that solves this error. 非常感谢您的帖子,对于我的帮助,我创建了一个解决此错误的模块。

https://github.com/jruzafa/Devopensource_LayerCatSeo https://github.com/jruzafa/Devopensource_LayerCatSeo

Actually, the big number of URLs is the bigger issue than the length of these filter URLs: 实际上,与这些过滤器URL的长度相比,URL的数量大是一个更大的问题:

Please see the answer from here as copy below, with the solution to fix SEO issues caused by the huge number of layered navigation URLs. 请从以下副本中获得此处的答案,以及解决由大量分层导航URL引起的SEO问题的解决方案。

Hiding something from Google (or trying to do so) based on Session/Cookie/User-Agent is never a good idea. 隐藏基于Session / Cookie / User-Agent的Google内容(或尝试这样做)绝不是一个好主意。 Google does not like to be cheated but wants to see the site just like any other visitor. Google不喜欢被骗,但希望像其他访客一样看到该网站。

robots.txt, rel=nofollow etc. also do not fully fix this issue or have at least some downsides or limitations. robots.txt,rel = nofollow等也无法完全解决此问题,或者至少存在一些缺点或限制。

A better and more elegant solution for hiding layered navigation for crawlers and fix SEO issues caused by the huge number of layered navigation URLs would be using PRG Pattern . 一种更好,更优雅的解决方案,可以使用PRG Pattern来为爬网程序隐藏分层导航并解决SEO问题(由大量分层导航URL引起)。

This works like a charm, ie not changing the UX regarding Layered Navigation and 100% reliable in terms of preventing crawlers from wasting crawl budget on useless duplicate content URLs. 这就像一个魅力,即,不更改有关分层导航的UX,就防止爬虫将爬虫预算浪费在无用的重复内容URL上而言100%可靠。

Simply said, it's about replacing the GET request to a layered navigation/filter URL with a POST request (which search engine crawlers do not follow) before redirecting the user to the original layered navigation/filter URL. 简而言之,这是在将用户重定向到原始分层导航/过滤器URL之前,用POST请求(搜索引擎爬虫不会遵循的POST请求)替换分层导航/过滤器URL的GET请求。

For further details and reading, please see 有关更多详细信息和阅读,请参阅

  1. Detailed explanation incl. 详细说明,包括 sample request flow 样品申请流程
  2. Why robots.txt, rel=nofollow etc. are no satisfying solutions here 为什么robots.txt,rel = nofollow等在这里没有令人满意的解决方案
  3. PRG Pattern Magento 2 Extension PRG模式Magento 2扩展
  4. PRG Pattern Demo PRG模式演示

This is the technical solution: 这是技术解决方案:

  1. Copy filter.phtml from app/design/frontend/base/default/template/catalog/layer to the equivalent directory in your site's theme. 从复制filter.phtml app/design/frontend/base/default/template/catalog/layer到您的网站的主题的等效目录。
  2. In the anchor tag there (should be only one) add a rel="nofollow" attribute. 在定位标记中(应该只有一个)添加rel="nofollow"属性。

However, I would expect first that a SEO expert tell us if this should be done this way or not. 但是,我首先希望SEO专家告诉我们是否应该这样做。

You might also consider using a rel="canonical" to point back to the main category that lists all of your products, that way more "juice" is sent back to that page for ranking. 您可能还考虑使用rel="canonical"指向列出所有产品的主类别,这样,更多的“果汁”将被发送回该页面进行排名。

More on that here: http://www.google.com/support/webmasters/bin/answer.py?answer=139394 此处的更多信息: http : //www.google.com/support/webmasters/bin/answer.py?answer=139394

Another solution would be to add the site to Google Webmaster Tools and then adjust how Google treats certain query string variables. 另一个解决方案是将网站添加到Google网站站长工具中,然后调整Google如何对待某些查询字符串变量。 By default, Google (and presumably others) examine pages with certain query string variables and try to determine if the page is different enough to rank separately or only rank the most relevant page. 默认情况下,Google(可能还有其他公司)检查带有某些查询字符串变量的页面,并尝试确定该页面是否足够不同以分别排名或仅排名最相关的页面。

Why don't you read YOAST Magento SEO article? 您为什么不阅读YOAST Magento SEO文章? YOAST Magento SEO YOAST Magento SEO

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM