Magento SEO: The How-To Guide, Part I

Magento SEO

SEO! Magentians everywhere, those three letters should be the bedrock of your web strategy—they determine positioning, reception, marketing initiatives, and a host of other crucial undertakings for online businesses.

Chances are you’ve already done a fair bit of SEO, but even a cursory glance around the web shows a distinct lack of Magento SEO advice.

This is less than ideal.

Luckily, Yoast put together a dynamic overview of Magento concerns, tactics, and workarounds in the SEO realm! That’s right: as Magento evolves and best practices come into their own, Yoast will keep updating their piece to reflect the changing landscape. In the meantime, though, we’d like to put the spotlight on the existing, proving Magento SEO information. As the first article in a two-part series, this piece will cover Basic Optimization Strategies. The second part will delve more into issues with templates and advanced tips for a fully executed Magento SEO strategy. Let’s get to it!

Basic Technical SEO for Magento

General Configuration

Caveat: the following assumes that you’ve updated to the most recent Magento release. If you need to do so, check the Magento website for instructions on modernizing your platform.

Firstly, you should know that Magento gets cozy with search engines right off the bat. They take you most of the way there—but you need to address a few issues to achieve ideal optimization. Start by enabling Server URL rewrites under System -> Configuration -> Web -> Search Engine Optimization. On that same screen, under URL Options, set “Add store code to URLs” to “no” (in some rare cases, you might want a “yes” here—feel free to contact us if you’re unsure and we can give a more informed answer).

Under Unsecure/Secure, you’ll be able to set your preferred domain in the “Base URL” field. Basically, this lets you opt between www and non-www versions for your URLs. NOTE: this won’t automatically redirect from one to the other. To do that, create a 301 redirect through .htaccess with mod_rewrite; this has the additional benefit of preventing Magento from adding the SID query to your URLs. You’ll want to make sure the Base URL is the same as the redirect. The following code can be added when editing .htaccess to redirect index.php to root:

[around line 119]

1    RewriteBase / RewriteCond %{THE_REQUEST} ^[A-Z]{3,9} /index.php HTTP/
2    RewriteRule ^index.php$ [R=301,L]

Alternatively, if you Magento install is in the sub-directory instead of the root:=

1    RewriteBase /magento/ RewriteCond %{THE_REQUEST} ^[A-Z]{3,9} /magento/index.php HTTP/
2    RewriteRule ^index.php$ [R=301,L]

Header Settings

Magento automatically outfits you with “Magento Commerce” as a page title. You don’t have to just leave that, do something about it! In general, live by this mantra: “early words count more”. Not only do search engines put more weight on the first few words, visitors often can’t be bothered to read the entire line when they’re in a hurry. So stick your keywords up front!

To change the default title, navigate to Configuration -> Design -> HTML Head. Be descriptive and concise with this title; it’ll be used for your non-content pages without custom titles (e.g., “Contact Us”). Use the “Title Suffix” field to add your store name to all pages, should you desire.

Just a few more things to clean up your site. To save space in your title, leave “Prefix”, “Default Description”, and “Default Keywords” empty. Also, if you want to prevent indexing of the site (say, for a non-production environment), it may be useful to set “Default Robots” to “NOINDEX, NOFOLLOW”—otherwise, it should definitely be set to “INDEX, FOLLOW”.

Another great way to improve Magento SEO on page headers is to add new canonical tags, available through various extensions on Magento Connect. NOTE: Magento has a tendency to turn non-set meta robots into meta tags, as in:

<meta name="robots" content="*" />

If this happens, you should remove these empty metas from your code to avoid troubling search engine behavior.

CMS Pages

Magento favors simple CMS, which usually suffices for most purposes in terms of scope, flexibility, and page aspect control. Keeping in mind the search-engine friendly tips above, fill each CMS page with well-written content, select a URL Identifier and Page Title, and pen a corresponding description. You can keep “Keywords” empty.

Remember that the description is the human element: it should entice clicks when presented in search engine results, so be sure to grab their attention with a straightforward hook. Do not resort to auto-generation. This shows up far too often and is fairly obvious to most savvy searchers. You’ve seen it before: two or three random snippets with bolded keywords, separated by ellipses. Distinguish your efforts with readable descriptions.

Category Optimization

Magento also defaults to adding category names to paths for product URLs, which has the unfortunate side effect of creating (often-penalized) duplicate content issues for search engines. To disable this function, set “use category paths for URLs” under System -> Configuration -> Catalog -> Search Engine Optimization to “no”.

To set details by category, navigate to Catalog -> Manage Categories. The most important fields are:


•    Meta Description – again, an attractive description that humans would want to read.
•    Page Title – keep this empty so that parent categories will populate in your titles. If you customize here, Magento will use your exact entry without including parent categories.
•    URL Key – again, short and keyword-rich! Drop articles (a, an, the) and other space-wasters. If you cater to multiple languages, you should keep this language-independent.

Product Optimization

This follows a similar procedure to Category Optimization. You’ll be able to set meta information for “Default Values” and for each “Store View”. NOTE: for “Meta Title”, custom entries will overwrite the complete page title except for prefixes/suffixes, not just the product name.

Images need love, too! Both alt tags and image file names contribute to search engine success in the big picture. Not only that, visitors using screen readers will then be able to have a good idea of what’s in front of them.

By default, images will be renamed with the product title, which also populates the “Title” and “Alt Tag” fields. It may take some effort, but it’s ultimately worthwhile to reset these for each image. You should know that you can also set the label for each product image (including alt and title tag) in the “Images” tab under Product Information. This applies to specified Store Views, as well.

That’s it for Now!

Be sure to check out Hara Partners’ page on Magento SEO—lots of useful information to be found there!


Read on for more advanced Magento SEO tips and tricks.

Leave a Reply

Your email address will not be published. Required fields are marked *