Fix Duplicate Meta Titles and Descriptions for Review Pages

meta-tagsseo

Consider the following example:

KHAKI BOWERY CHINO PANTS

If you inspect page source, you'll notice:

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Khaki Bowery Chino Pants - Pants &amp; Denim - Men</title>
<meta name="description" content="Straight leg chino. Back pockets with button closure. 14&quot; leg opening. Zip fly. 100% cotton." />
<meta name="keywords" content="Khaki Bowery Chino Pants" />
<meta name="robots" content="INDEX,FOLLOW" />

However, if you view the reviews page for said product (note the different URL /newstore/review/product/list/id/456/category/17/):

KHAKI BOWERY CHINO PANTS (All reviews page)

The same meta information exists in the page source:

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Khaki Bowery Chino Pants - Pants &amp; Denim - Men</title>
<meta name="description" content="Straight leg chino. Back pockets with button closure. 14&quot; leg opening. Zip fly. 100% cotton." />
<meta name="keywords" content="Khaki Bowery Chino Pants" />
<meta name="robots" content="INDEX,FOLLOW" />

Using Google's Webmaster Tools, you can access the HTML Improvements section. Google is complaining about my review pages having identical values for meta descriptions & meta titles between the main product page & the review page.

Is there any way to resolve this, programmatically? Surely if Google is listing it here it requires being addressed?

I read this article – Search Engine Journal – 5 Duplicate Content Issues for Magento which mentions:

3) Duplicate content from Review Pages
Blockquote

Review pages are interesting, because the issues can vary depending on
how you structure your website and the plugin you’re using. We faced a
duplicate content issue when we were displaying review content on
product pages, but had a separate page for the same content—but I know
that this is not always the case.

So, for the scenario that we faced, we removed the extra pages (one
for each product), which looked like this:

/review/product/list/id/6585/

In order to remove these pages, we simply disallowed the /review/
directory in the robots.txt file and then submitted a removal request
for the folder.

Once again, review pages would only cause duplicate content issues if
you’ve structured your website in the same way as we did, where you
can go to a specific page to read product reviews, as well as on the
product pages themselves.

It seems like natively, this issue exists with Magento (unless I'm mistaken – in which case please correct me).

So would that be the solution – to use your robots.txt file to disallow Google access to the /review/ directory?

The article mentions

…and then submitted a removal request for the folder.

I don't see the ability to use regular expressions on the Remove URLs page using Google Webmaster Tools though?

Edit: Apparently another solution could possibly be to use Canonical URLs on the review pages, though apparently Google can still persist and index the review page.

Source: Comments

Best Answer

Of course, you can restrict your review pages from indexation. That can be done by removing links to this page and moving the reviews list to the main product pages. This is the way most of users who have a custom theme choose.

However, a better alternative to this 'standard' solution would be changing meta descriptions and meta titles for your reviews page.

Just copy this: /app/code/core/Mage/Page/Block/Html/Head.php to: /app/code/local/Mage/Page/Block/Html/Head.php

and modify (the example for meta titles and meta description will be the same): from:

public function getTitle()
    {
        if (empty($this->_data['title'])) {
            $this->_data['title'] = $this->getDefaultTitle();
        }
        return htmlspecialchars(html_entity_decode(trim($this->_data['title']), ENT_QUOTES, 'UTF-8'));
    }

to

public function getTitle()
    {
        if (empty($this->_data['title'])) {
            $this->_data['title'] = $this->getDefaultTitle();
        }      
        ///Added 'Review for' for title
        if ($this->_getCurrentFullActionName() == 'review_product_list') {
            $this->_data['title'] = $this->__('Reviews for') . ' ' . $this->_data['title'];
        }
        ///

        return htmlspecialchars(html_entity_decode(trim($this->_data['title']), ENT_QUOTES, 'UTF-8'));
    }

protected function _getCurrentFullActionName()
    {
        $controller = Mage::app()->getFrontController();
        if(is_object($controller) && is_callable(array($controller, 'getAction'))){
            $action = $controller->getAction();
            if(is_object($action) && is_callable(array($action, 'getFullActionName'))){
                $actionName = $action->getFullActionName();
                if($actionName) return $actionName;
            }
        }
        return null;
    }

This and other problems, for example, not friendly URLs for review pages or duplicate content in different categories:

http://clients-sherodesigns.com/newstore/review/product/list/id/456/category/17/ http://clients-sherodesigns.com/newstore/review/product/list/id/456/

can be solved by using MageWorx SEO Suite Ultimate - the software will correct all the issues with URLs and duplicate content:

http://clients-sherodesigns.com/newstore/khaki-bowery-chino-pants/reviews

Related Topic