Best Practices to Improve Magento SEO

Posted by & filed under List Posts.

Kyle is managing a webstore that specializes in refurbished components for mountain and road bikes. The company is planning to “shift gears” with its web store to Magento. Kyle is taking an initial foray into the new web store’s search engine optimization. Although Joe and his team understand that Magento is well-built for the search engines, he wants to fine-tune it immediately so that the site is working at its best.


What can Kyle do? Below, we go through several standard best-practice recommendations. First we address immediate, out-of-the-box technical optimization tips to improve search engine friendliness of your site’s URL structure (e.g. metadata, robots.txt, XML sitemap, ALT tags). Then we look at two broader topics: content marketing, with an infographic of pointers from 24 executives, and speed.


How to optimize Magento “out-of-the-box” for better SEO


Well, you probably did not pull Magento out of a box… Nonetheless, you do need to immediately tweak some of the technical specifications within Magento “out-of-the-box” – to customize it – in order to make its SEO as powerful as possible.


The good news from the outset is that Magento is initially well-tuned for SEO, according to Netherlands-based search-engine optimization firm Yoast (which is reponsible for 10.6% of core commits to the WordPress code base, per WP core developer Aaron Jorbin).


Before we get into these technical tweaks, note that you want to download the latest release. Here is the official download page for the free open source community version of Magento; here is where you can look at the paid version, Magento Enterprise (which offers improved performance over the Community edition, among other upgrades).


Yoast then recommends going into the settings so that you can allow server URL rewrites. Enter System > Configuration > Web > Search Engines Optimization. Within the same panel, click into URL Options and switch “Add store code to URLs” to No.


www vs. non-www


You will see the base URL for Magento under “Unsecure”/“Secure.” That’s where you can establish your preferred domain name, i.e. the decision between the versions with and without www.


Take Kyle. Kyle needs to decide whether his restored cycling component store should be listed as or Joe chooses, thinking that the shortened version is long enough at 23 characters. Simply adjusting this setting does not redirect from to though, or vice versa; it only establishes preference. Hence, Joe creates a 301 redirect via .htaccess with mod rewrite, so that traffic goes through the latter version. In addition to better defining how the site is organized, it means that Magento won’t add the SID query to URLs (e.g. ?SID=h7i38596y3t34s3u22sk293484wpd49i). Finally, he verifies that the Base URL matches the redirect.


Kyle adds this code to the .htaccess file to redirect index.php to root, at about line 119:

1 RewriteBase / RewriteCond %{THE_REQUEST} ^[A-Z]{3,9} /index.php HTTP/

2 RewriteRule ^index.php$ [R=301,L]


Note that if Kyle’s Magento installation had been in the sub-directory instead of the root, he would have used this code:


1 RewriteBase /magento/ RewriteCond %{THE_REQUEST} ^[A-Z]{3,9} /magento/index.php HTTP/

2 RewriteRule ^index.php$ http:// [R=301,L]




When you download Magento, it will have the title “Magento Commerce” – which is obviously not the title of your store. To improve your rankings with the search engines, note that you should prioritize the early words: your keywords should come early because people are likelier to see them in that position when scanning a page, and because search engines focus hugely on the first few words.


Kyle goes into Configuration > Design > HTML Head and changes the title from “Magento Commerce” to “Sustainable Mountain & Road Bike Parts | Refurbished Cycling Components,” preparing this title that is typically used for generic non-content pages such as the Contact Us page. Then Kyle decides that, for branding, he wants to have the name of his business in all the page titles. He adds “Bike Part Heaven” under “Title Suffix.” However, as advised by Yoast, Kyle leaves the “Title Prefix” empty – since those initial characters are crucially important for SEO keywords. He also avoids adding anything under “Default Description” and “Default Keywords.” Finally, Kyle keeps “Default Robots” at “INDEX, FOLLOW,” because it is not a non-production environment; and he adds the canonical tag. (Here is information on the canonical meta tag within Magento.)


You want to optimize your entire store, not just the main pages. Internet marketing blog The Next Scoop recommends a minimum of five keywords per page, used in both the meta title and description. The metadata you use to describe each of your product pages should be both highly relevant and compelling, since the end goal is getting people to click for a better CTR and more leads.


Standardly, the meta title should be 40-60 characters, the meta description should be 150-180 characters, and commas should be placed between keywords.


XML sitemap


You want to serve your site up to the search engines in a manner that makes their job simple. An XML sitemap allows the search engines to more easily search and index your site. The sitemap needs to be submitted directly through the webmaster tools of Google, Bing, etc.


Here’s how to create one:


  • Go to System > Configuration > Google Sitemap > Add New.
  • For Filename, type “sitemap.XML.”
  • For the path, that is the server directory where you want the sitemap to be stored.
  • Choose the store that the sitemap covers.
  • Save to create the sitemap.

ALT tags for images


Product images are incredibly key for ecommerce effectiveness. Just as images are central to captivating shoppers, these images are also fundamental to search engines. Make sure you have ALT tags for all the images.


To implement ALT tags systematically, Kyle uses a script that auto-generates them to be the file name (omitting any hyphens).




The search engines are checking the web for new and helpful thoughts to best answer a user’s request. Plus, there is essentially no way to fake content, because unreadable, poor-value “keyword-stuffed” or duplicate content (via license, plagiarism, or internal reuse) will sink you in search. In this environment, it’s necessary to embrace content marketing. Here is an infographic from customer referral firm ReferralCandy, featuring advice on the topic from two dozen major-brand executives:

24 Juicy Tips for Ecommerce Content Marketing from Inbound Marketing Pros [Infographic]




The speed of your Magento store will have an impact on how it gets ranked in the search engines. Performance is also fundamental to strong user experience. To improve your speed, here is some basic advice:


  • Use the most recent version of Magento (as indicated above)
  • Tweak your MySQL configuration
  • Enable flat catalog
  • Optimize the images
  • Compress CSS and JS files
  • Optimize logs and database
  • Implement caching
  • Use a content delivery network
  • Choose a high-quality web host.


Kyle understands that the infrastructure that backs his site will have a deep impact on the speed he achieves. He decides to lay a strong foundation by switching to a more powerful hosting service and adding a CDN plan before working his way through other improvements.




Are you like Kyle? If you’re using Magento and building sales, chances are that you are laser-focused on fine-tuning your SEO; and speed is one way to do that. At Total Server Solutions, we offer high performance web hosting for e-commerce. Learn more.