Trimming The URL Fat in Magento

As an E-Commerce site owner, you’d like your users to be able to find the product they’re looking for as quickly as possible. In order to help them out, you put Filters in your categories. You may also be tagging campaigns with elements in the URL that could be perceived as different links to the same page. Often the more you add for usability the more direct links with variables in the URL you create. This means more names for what is perceived as the same thing.

The way Magento handles these filters is by adding a s Query String (the part after the question mark in your URLs). While it is a common practice and works great for the users, the search engines see each page with a different set of Query String as a different page altogether.

To let the search engines know that the current variation the bot is at, is the same as another one we use “Canonical” . This is basically how to tell search engines this is a duplicate and search engines should use “the following” URL as the official version.

In this way when you have shown engines 10 different ways to get essentially the same page, they treat them all as one and not as a major duplication issue on your site.

The canonical tag looks like this: “<link rel=”canonical” href=”” />” where the href attribute points at the default version you want Google to use when referring to that page.

For example, if your catalog is configured to include the category path in product URLs, your store will generate multiple URLs that point to the same product page.


Although in the past a plugin was required in order to make this change automatically, in the latest versions of Magento the automatic-canonical feature is incorporated into the system’s core.

To enable the canonical meta tag:

  1. From the Admin menu, select System > Configuration.
  2. In the Configuration panel on the left, select Catalog.
  3. In the Catalog section, click to expand the Search Engine Optimizations section. Then, do one of the following:
    • If you prefer that search engines index only pages with the full category path, set Use Canonical Link Meta Tag for Categories to “Yes.” Then, set Use Canonical Link Meta Tag for Products to “No.”
    • If you prefer that search engines index only product pages, set Use Canonical Link Meta Tag for Products to “Yes.” Then, set Use Canonical Link Meta Tag for Categories to “No.”
  4. When complete, click the Save Config button.

About author

Todd Kron

of Sellaholics is a veteran of Analytics, PPC, Display, video, UX, conversion optimization, affiliate programs, web design and web programming since 2002. My background includes affiliate sales to 6 figures, director of a web design agency, and currently the digital manager for a leading energy company located in Huntersville, NC. From search to sale 1000 different ways is my background. Sellaholics is a Google Partner Agency.

Related Articles