Magento SEO: Optimizing Pages and Avoiding Duplicate Content Penalties

In this second part of this series, we’ll explore ways to optimize our category and product pages for best search results. We'll also review some advanced techniques on how to avoid duplicate content penalties from search engines.

So, without further ado let’s start, as we have a lot to cover here.

Optimizing Category and Product Pages

Category and product pages are the soul of any eCommerce website; therefore, it is important to include an effective SEO strategy for these pages so that we can rank well in search results. We’ll discuss best practices for optimizing these two types of pages separately.

To demonstrate the best practices used for optimizing category pages, I've shown the top search results in Google for the keyword “Patio Furniture” in the following screenshot: 

Patio Furniture search results in Google

There are many similarities in these search results. First, they all use the keyword in the title and description. Secondly, they all use the brand name in their page title. Next, they use words like "buy", "shop" and "purchase" in page titles and/or in their meta descriptions. This shows that these pages represent shopping websites. Finally, they all show some positive points in the description, to attract the user. We’ll try to accommodate all these points in our category pages.

First of all, to append the brand name at the end of each page title, instead of doing this manually for all product and category pages, we can make one change from the admin panel, and it’ll automatically append the brand name at the end of each title.

To do this, go to System > Configuration > Design > HTML Head, and in the Title Suffix field, enter the brand name after a dash () or pipe sign (|), for instance “– Brand Name”.

Adding title suffix in Magento HMTL Head

Optimizing Category Pages

Now, to edit the page title and meta description for each category, go to Catalog > Manage Categories, open up the desired category, and enter the text in the General Information tab.

Adding page title and meta description

Please note that changing the page title doesn't change the category name. These two are separate entities. For the page title, the recommended length is between 50 and 70 characters, including the appended brand name. 

For a meta description, the recommended length is up to 160 characters. It is imperative to note that if we don’t enter a meta description for category pages, it will use the store's default meta description. In that case, search engines can issue duplicate content penalties assuming that we have same description text entered on two different pages. It is therefore almost mandatory to enter a unique meta description for each category page.

Optimizing Product Pages

Coming to page optimization techniques for product pages, let’s first look at some good search results of product pages for the search term “canon rebel t3i”:

Search results for the term canon rebel t3i

As you can see, many of the rules defined for category pages are also applicable here. For instance, the intended length of the page title and meta description are the same. They should also contain keywords in the title and meta description, and the brand name should be appended after the page title.

To edit the page title and meta description text for product pages, go to Catalog > Manage Products, click on the required product name, and enter the text in the Meta Information tab.

Enter page title and meta description for product pages

To reiterate, changing a page title won’t affect a product's name, as they are two separate fields. Another important thing to note here is that unlike with category pages, if we don’t specify a meta description for product pages, it will not fall back on the store's default meta description. 

Instead it will use the first 180 to 200 words of the product description text as the meta description, which is a workable solution. It is still recommended that you write separate text for meta description field, as the first 200 characters of a product description text are not always appealing enough to create user intent, which results in product purchase.

Optimizing Product and Category URLs

Finally, the URL is one more thing we should cover regarding category and product page optimization. Generally Magento does an excellent job of creating SEO-friendly and human-readable URLs. Some steps mentioned in the previous tutorial in this series further refined it by eliminating the redundant “index” and category names from product URLs; therefore, up to this point, we’ll have nice URLs in place. 

However, if you think that your URL keys for some individual product pages or category pages are becoming too lengthy, or contain redundant words like "and", "or", etc, then you can also modify these URL keys by going to Catalog > Manage Products and clicking on the General Information tab for products, or Catalog > Manage Categories and clicking on the General Information tab for categories.

Changing URL text

Avoiding Duplicate Content Penalties

Some of the scariest words in search engine optimization for any eCommerce platform are "duplicate content penalty". Due to the inherent structure of eCommerce websites, there will be a number of circumstances where search engine crawlers assume that you have duplicate content on your pages in your Magento store. 

Some of these issues will be effectively tackled by the steps advised in the previous part of this series. Yet, there are still more steps you can follow to effectively mitigate the threat of duplicate content penalties.

Editing the Header Template

It is important to briefly mention the function of canonical links. Sometimes due to sorting, layered navigation or other factors, different URLs actually point to the same page in a website. 

Some examples of such URLs are:

http://www.example.com/products?category=dresses&color=green
http://www.example.com/products?sortby=total_reviews|des

http://example.com/dresses/cocktail.html
http://example.com/dresses/cocktail.html?gclid=ABCD

To avoid duplicate content penalties, we can add canonical links in the head tag of the page, which look like this:

<link rel="canonical" href="page.html"/>

That tells search engines that the preferred location of this URL is http://example.com/dresses/cocktail.html instead of http://example.com/dresses/cocktail.html?gclid=ABCD.

I have described the steps to enable canonical tags in Magento in a previous article in this series, and in most cases that step alone will take care of many duplicate content problems. 

But sometimes our duplicate pages may still be cached by search engines, especially if the website has been live prior to turning on the canonical elements. To deal with this situation, we’ll manually add some lines of code into our template head.phtml file, to ensure these canonical tags are called each time a product or category page is opened.

Open your Magento directory and navigate to app/design/frontend/[theme name]/default/template/page/html/head.phtml. If there is no head.phtml file there, copy it from the location app/design/frontend/base/default/template/page/html/head.phtml and paste it there.

In this head.phtml file, place the following code, where other <link> tags are mentioned:

This code will manually add canonical tags on each product and category page. Another great step recommended in this article is to add this code at the end of the head.phtml file:

This will implement rel=prev and rel=next for Magento’s pagination, to communicate to the search engine crawlers that the pages being displayed should be interpreted as paginated product listings, and not as duplicate content. The above code will add links like below, when it is on page 3 of the product listing results:

Duplicate Content on Translated Pages

Magento is superb at providing multi-language support to its users. We have all the autonomy within Magento to set up different languages for our stores. While we’ll dig deep into the SEO considerations for setting up a multi-language store later, it's important to mention a few tips on how to avoid duplicate content penalties for websites using multiple languages. To mitigate this threat we should use the rel="alternate" hreflang="x" tag.

The best place to put this tag is into the head of the page. As it would be difficult to manually put this into each page’s head tag, the way around it is to use the Miscellaneous Scripts field at System > Configuration > Design > HTML Head > Miscellaneous Scripts

Example code for this field could be:

Miscellaneous Scripts field in Magento

With all this done, we've made our Magento store quite SEO-friendly, and we have made every possible effort to avoid duplicate content penalties. 

In the next article of this series, we’ll discuss how to speed up our Magento store to reduce page load time, and also how to enable different schemas into our Magento store to give a professional look to our search engine results.

Tags:

Comments

Related Articles