首页 文章

Magento分层导航和SEO

提问于
浏览
5

我对Magento分层导航和seo有疑问 .

我们的网站似乎正在使用与属性相关的网址编制索引,例如www.abc.com/exampleproduct?brand=69

这会产生大量重复内容的问题 . 有没有人来过这样的事情并且有任何好的解决方案 . Inchoo在这里写了一篇关于它的博客:http://inchoo.net/online-marketing/magento-seo-how-to-handle-problems-caused-by-layered-navigation/但它并没有真正找到一个可靠的解决方案 .

提前谢谢,cm .

4 回答

  • 2

    您可以将Head.php文件(/app/code/core/Mage/Page/Block/Html/Head.php)复制到本地目录(/ app / code / local / Mage / Page / Block / Html / Head . PHP)

    以下是如何实现新文件的修改:

    public function getRobots()
        {
            if (empty($this->_data['robots'])) {
                $this->_data['robots'] = Mage::getStoreConfig('design/head/default_robots');
            }
    
            //Added NOINDEX, FOLLOW for category page with filter(s)
            if(Mage::app()->getFrontController()->getAction()->getFullActionName() == 'catalog_category_view'){
                $appliedFilters = Mage::getSingleton('catalog/layer')->getState()->getFilters();
    
                //var_dump($appliedFilters);  //<-- uncomment and see filters as array in page source code in meta robots tag.
    
                if(is_array($appliedFilters) && count($appliedFilters) > 0){
                    $this->_data['robots'] = "NOINDEX, FOLLOW";
                }
            }
    
            return $this->_data['robots'];
        }
    

    附:另请注意,您应该为对象添加一些检查 .

    Mage::app()->getFrontController()->getAction()->getFullActionName()
    
  • 0

    用于隐藏爬虫的分层导航并修复由大量分层导航URL引起的SEO问题的可靠而优雅的解决方案将使用PRG Pattern .

    canonical,robots.txt,rel = nofollow等不能完全解决这个问题或至少有一些缺点或限制 .

    PRG Pattern解决方案就像魅力一样,我 . 即不会改变有关分层导航的用户体验,并且在防止抓取工具浪费无用重复内容网址上的抓取预算方面100%可靠 .

    简单地说,它是在将用户重定向到原始分层导航/过滤器URL之前,将GET请求替换为带有POST请求的分层导航/过滤器URL(搜索引擎爬虫不遵循) .

    有关详细信息和阅读,请参阅

  • 2

    尝试使用规范网址元标记,谷歌,雅虎和其他主要搜索引擎将只索引该元标记指定的网址 . 为此,我建议:Yoast extension

  • 0

    在视频中,有一些解决方案,如nofollow,Robots.txt等 . 您也可以查看以下建议 .

    • 您可以在所有动态/过滤器页面上使用相应产品页面/类别页面的规范 .

    • 如果您遇到此问题,Google网站站长会报告重复的元标记,因为所有网页都已编入索引,并且它们包含主页的元标记 . 然后你可以去动态元标记 .

    但是使用主页的规范是最好的选择 . 希望这些建议对您有所帮助! :)

相关问题