Magento SEO: The How-To Guide, Part II
Welcome back to Part II of our series on Magento SEO, derived from Yoast’s comprehensive coverage on their net hub. Last time, we covered the basics of configuration and technical SEO for Magento. Today we’ll cover templates and some advanced Magento SEO techniques to truly pump your sites’ optimization game to the next level. It may seem like a lot, but feel free to be incremental; as long as you’re careful, you can take these step-by-step if you need to.
Each element does some good on its own, and in tandem they constitute a powerfully grounded Magento SEO strategy. Let’s begin!
Magento Template Optimization
Skins
Magento’s out-of-the-box skins—“Default Theme”, “Blue Skin”, “Modern Theme”—aren’t all that header-friendly, so it’s in your best interest to seek out custom, blank themes with room for SEO elements.
Headings
You logo should be an <h1> on the front page and an <h3> thereafter. Basically, the content title should always be apparent as such. For example, on a product page, stick the actual name of the product in an <h1> tag. On category pages, reserve category names for <h1> and relegate included products to <h3>. This may seem like a no-brainer, but you’d be surprised how often this gets overlooked and how detrimental that can be.
On the flipside of the coin, overusing headings can hurt, too. Avoid them entirely in sidebars. There’s no reason to use <h4> tags for “static” or kewordless titles—use <strong> instead. And, of course, keep your content clean, organized, and relevant with the proper keywords.
Neaten Your Code
You’ve got to keep your templates clean! Move your JavaScript and CSS to external files; the more cluttered your templates, the worse your Magento SEO report card will be. The benefits? Users will be able to cache those files on the first load, and search engines usually won’t have to download them. Everybody wins!
Speed Up
Speaking of which, the daily amount of your pages a search engine can spider is directly proportional to the speed at which your shop loads. So how do you get faster?
1. Enable caching via System -> Cache Management. Be sure to enable all caching features there.
2. Don’t skimp on hosting/server configuration. MySQL and PHP opcode cache make a huge difference.
You’ll also want to reduce the number of external files, combining them wherever possible (Magento already combines most JavaScript files into one by default). Remember that each file visitors have to download requires their browser to create another connection to the webserver. A great place to start is with stylesheets, which the default template keeps separate in six different files. Go ahead and combine everything but print.css into one file.
Modules exist which make this process easier, and some will also compress and cache, as well. Know that these may require rewrite permission and/or .htaccess support.
Advanced Magento SEO
You’ve come this far—don’t give up on the final lap! From here on out, it’s all about eliminating duplicate content. Unfortunately, some of our natural tendencies translate to duplicate content on Magento, which is a huge no-no when search engine spiders come around. For example, if you’ve got a certain product, it’s reasonable to expect that its page’s URL might look something like:
www.example.com/product.html
Which is all fine and dandy, except what happens when you link to that page from a category page further up the hierarchy? Something like:
www.example.com/category1/product.html
Similarly, you may end up with even more instances of “duplicate content” in the eyes of search engines, pages like:
www.example.com/catalog/product/view/id/1
www.example.com/catalog/product/view/id/1/category/1
And that’s not even getting into product review subpages and the like. Long story short, this is a serious problem that falls under the radar of most casual Magento SEO campaigns. People create these issues because we all love layered navigation and other modern site practices that give more options to visitors; redundant options are eminently user-friendly, but they certainly aren’t SEO-friendly.
The answer? Set up your site to permit spidering instead of indexing, and adjust sorting/navigation. Here’s how:
Non-content Pages
For these pages, use the “Noindex, Follow” protocol. You’ll need a meta module or extension to do this. This way, search engines will follow all links on these pages, but it won’t index them in the process.
Don’t link to login, checkout, wishlist, or other non-content pages. The same goes for RSS feeds, layered navigation, add to wishlist, add to compare, or other buttons/features. Unfortunately, as of this writing, there’s no easy extension for this. You’ll have to go into your template files and manually add “nofollow” to these links yourself.
Canonical URLs
You’ll need an extension for this, as well. Use the new “canonical URL” tag to suggest your preferred version of the URL for each page, which helps search engines differentiate between sites it might otherwise label as duplicate content.
XML Sitemaps
This won’t help you rank, but it can speed up indexing because it makes it easier for search engines to find your content. You can create an XML sitemap manually by navigating to Catalog -> Google Sitemap -> Add Sitemap. From there, choose a file name, path, and store view, then press “Save and Generate”. To point search engines towards the sitemap, insert the following code in your robots.txt file:
Sitemap: http://domain.com/sitemap.xml
NOTE: as your inventory changes, you’ll need to continually re-generate the XML sitemap. The best way to do that is via a cron job.
Wrapping Up
And that’s it, for now! Because this is an evolving field, expect Magento SEO tactics to change in the coming months and years. It’s about aligning with search engine parameters, after all. Plus, Magento being the open-source platform that it is, it’s highly possible that many of these are being incorporated into Magento core even now. Please get in touch with us if you have any questions, comments, or if you’d like to see what we can do for you in terms of a Magento SEO campaign. We’d be glad to help!