The Complete Magento SEO Best Practice Guide

If you have a website, you will want to attract natural and organic traffic. And as e-commerce platforms go, Magento is one of the best out-of-the-box solutions you will find for optimizing your website for search engines.

To make the most out of your visibility in search engines, there are a number of techniques within the Magento admin you can do to increase the potential of buyers finding your site and making a purchase.

During the last five months, I’ve worked with a brand that has five websites in five different languages. The following explains how several improvements lead to an increase in organic traffic from 4,200 visits to 28,800 visits and an increase in organic revenue from $57,000 to $395,000.

organic traffic increase

Register your website with Google and Bing Webmaster Tools

Webmaster Tools provides insight into how Google and Bing see your site and if you have problems with it when they crawl your pages. Register your website in both Google Webmaster Tools and Bing Webmaster Tools  - Google will provide you with a ‘Google site verification’ tag and Bing will provide a ‘msvalidate’ tag.

Copy and paste the HTML tag into the Magento admin. You can find this under System > Configuration > Design > Miscellaneous Scripts.

webmaster tools field

Auto redirect base-URL to canonicalize your domain

It’s important that Google only find and index one version of your home page. If both http://www.example.com and http://example.com  can be accessed, your website will be penalized for site-wide duplicate content. You will need to redirect one to the other in Magento.

The default setting in Magento is set at a 302 temporary redirect. A 302 temporary redirect will not pass on any link juice so you need to change this to a 301 permanent redirect. You can change this under System > Configuration > General > Web > URL Options and set “Auto-redirect to Base URL” to “Yes (301 Moved Permanently)”.

autobase redirect url

Enable web server rewrites for user-friendly URLs

Having a user-friendly URL structure is important for both search engines and usability.In order to make sure your URL’s are user-friendly, visit System > Configuration > General > Web > Search Engine Optimization and set “Use Web Server Rewrites” to ‘Yes’.

web server rewrite

The difference in having a user-friendly URL structure compared to session based/ dynamic URLs can be seen below when we turned on the “Use Web Server Rewrites” setting, with the number of impressions in Google increasing immediately.

search impressions

In 2012, Atoll Paradise updated their URL structure to be more user-friendly and organic traffic increased by 350%. Over the course of twelve months this mean more than 420,000 visitors.

Prevent duplicate content by disabling category URLs

By default, Magento will use the category structure in the product URL. For example, a home furniture store may have a page URL www.mywebsite.com/bedroom/candles.

However, you may have products that exist in multiple categories. For example,

The best URL structure here would be www.mywebsite.com/candles.This removes the category in the URL. To change the URL structure visit System > Configuration > General > Catalog > Catalog > Search Engine Optimization.

You can then change the setting “Use Categories Path for Product URLs” to “No”.

category path

If you haven’t done so already, you can edit two further settings under “Search engine optimization”. Make sure that the following fields are set to “Yes”:

  • Create Permanent Redirect for old URLs if Url key changed
  • Use Canonical Link Meta Tag For Categories
  • Use Canonical Link Meta Tag For Products

Using the rel=canonical tag will stop your website being penalized for duplicate content.

rel-canonical

Create and upload robots.txt file

A robots.txt file is a text file that help search engines determine which information on your site to index. As a default, there is no robots.txt file in Magento so you will need to create the robots.txt file yourself.

By having a robots.txt file, you can prevent duplicate content issues and hide pages from search engines that you do not want indexed, such as CMS login, reports and files.
A robots.txt file is set up for one domain. In order to install it, create a new text file in Notepad and save it as a robots and a “.txt” file. You can then upload the file to the web root of your server (ex, www.mywebsite.com/robots.txt).

Here as an example of a standard Magento CMS based robots.txt file:

robots txt file

Simply copy the above and upload to the web root of your server.

Enable “Index, follow” to get your website found in search engines

It’s common that when you’re testing your website before launching, you hide the site from search engines so you enable “no index, nofollow”. But it’s also common that when you go live with your new website, you can forget to change it to “index, follow” or any other option that prevents your site being found in search.

To ensure that your website is being indexed and links are followed, visit System > Configuration > General > Design > HTML Head > Default robots “Index, follow”.

index follow

Create default Meta data to avoid duplicate content

As a default setting, Magento will leave your “default description” field blank, which means that both the default title tag and Meta description is missing. By leaving them blank, you may end up with hundreds or thousands of duplicate content issues on your site and Google will struggle to index certain pages.

In order to set a default title tag and Meta description for pages that have yet to be optimized, you can visit System > Configuration > General > Design > HTML Head > Default description.

default meta content

Using Rel=alternate hreflang for International rankings

For International websites, you will most likely have similar versions of your website in multiple languages. Google has provided a way for webmasters to not be penalized for duplicate content by creating the rel=alternate hreflang=X link attribute. By implementing this snippet into the <head> section of your website for each page that exists in a different language/ website, Google will be able to show the correct language and page in the search results.

For example, if you have German websites for both http://www.mywebsite.de and http://www.mywebsite.at, you would implement the following snippet in the <head> section on both websites.

In order to get the most out of your International website, this should be implemented at page level site wide. For example, your product page would include a similar snippet:

By implementing these snippets, Google will then be able to show the Austrian page to searchers in Austria and the German page for searchers in Germany.

To implement the rel=”alternate” hreflang snippet in Mangento, visit System > Configuration > General > Design > HTML Head > Miscellaneous Scripts.

href lang

At nameOn, we saw that the Norwegian website, which had the highest domain authority, was being ranked first in Google for branded searches.

nameon SERP 1

Once we were able to implement rel=”alternate” hreflang on both the German and Norwegian websites, the German website was immediately positioned in the first spot, which has helped organic traffic grow in Germany.

nameon SERP 2

Implement Google Analytics tracking code

Although not entirely related to SEO, tracking website visitors and site behavior is crucial to your businesses success. You will able to track which marketing activity generates revenue and from which country.

Your Google Analytics profile ID will start with “UA” and be followed by several numbers. For example, UA-3465789-9. Paste your Google Analytics profile ID into the field and tracking will begin immediately. It’s easy to get started with Google Analytics and once you have created an account, you can visit System > Configuration > Sales > Google API > Google Analytics.

google analyticsgoogle analytics

For International websites, it is recommended that you implement cross-domain tracking so that you can avoid having your websites appear as sources under the referral traffic report.

cross domain tracking

Default home page title tag

Another default setting in Magento will be the homepage title tag, which is set to “home”. You will need to edit this into a natural title tag that summarizes what your website is/ or does. To edit the home page title tag, visit CMS > Pages and once you find your home page, edit the “Page Title” field.

default title tag

In addition, you can edit the Meta Data tab (on the left) and update your home page Meta description.

default meta description

Create an XML Sitemap and submit it to Webmaster Tools

Creating an XML sitemap allows Google and other search engines to find products, categories and pages on your website. It’s up to Google to determine whether or not your page belongs in the index but an XML sitemap will speed up the process of being indexed/ crawled.

To set up an XML sitemap, visit www.xml-sitemaps.com.

Once you have your XML sitemap upload it to the root of your website (for example, http://www.mysite.com/sitemap.xml), and submit the sitemap under “Catalog > Google sitemap” in Magento.

xml sitemap

You can also submit your XML sitemap to Google Webmaster tools and best practice is to include the XML sitemap in your robots.txt file too. Here is an example of how we included it at nameOn.

xml sitemap robots txt

When adding the XML sitemap to Google Webmaster Tools, we saw an immediate impact in the number of pages crawled by Google.

crawl rate

Conclusion

No CMS is fully optimized for search engines and you will always need to further optimize your site to increase its visibility. SEO is an ongoing process but the techniques used above only need to be addressed one time, which means you can instead focus your efforts on building your social media presence, creating content and conversion rate optimization.

By following the tips above, more people will find your website in search engines and this will lead to an increase in visits and higher organic sales.

Are you using Magento to manage your e-commerce and SEO needs? Do you have any tips you would like to share? Let me know in the comments section below!

16 thoughts on “The Complete Magento SEO Best Practice Guide

  1. Hi Steven, nice guide.

    How do you handle faceted navigation with your Magento websites?

  2. Hi, wonderful article. I wonder how would you handle same products on different sub stores (one Magento installation) ? Canonical links are on per site basis i think. Is it possible to redirect canonical links from sub stores to the main one?

  3. Hi,
    i have a question regarding robots.txt file….

    if i don’t want to one of my CMS page that time where i have to set no index , no follow for particular page.

    like i have to put this line in robots.txt file.

    Disallow: / xyz. com/furniture

    or what to do. any other option you suggest.

    • Thanks for the comment Manish. I think setting it to noindex, nofollow is fine as it is.
      I would still use a robots.txt file to block some pages, like a login page, for example, and to include the XML sitemap in it.

      • Hi Steven ,

        if i set noindex, nofollow from Magento Backend, its apply to all the pages same things…,so i have set that index,follow.

        while i have put robots.txt on my site there already set for checkout and login page which not to include in indexing,

        now i want to not to index only one page like http://xyz.com/acde-cnd which is CMS Page.

        so if i put in robots.txt like Disallow: /xyz.com/acde-cnd

        and from backend its showing index, follow

        is it really not index my page or its still indexing , please help me on this.

      • Hi Manish,

        If you set noindex, no follow and it applies to the whole site then I recommend adding the page you want to block from SE’s to the robots.txt file.

        In Magento back-end it will show that it is index, follow on the page but in your robots.txt file it will show Disallow: /xyz.com/acde-cnd.

        If a page is added to the robots.txt file, you are giving a specific instructive to search engines to not index that page. However, it is not 100% fool proof.

        If you really want to block a page from search engines and noindex,nofollow is not an option, I would restrict it via passwords.

  4. Thank you Steven.

  5. Hey,
    Just a quick question,
    What if you have an issue with duplicate content because canonical tags were not enabled and category to URL was set to to yes,
    How would you fix this ?
    Thanks
    Mike

  6. Set the Cat URL to NO or Leave it to detect the Canoicals?
    Just double checking as knowing me ill do the complete wrong thing ha

    Mike

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s