- 17 August 2021
- Website Development
- Reading time:13 min
Magento SEO
Magento is one of the most search engine friendly e-commerce platforms straight out of the box, but there are several known issues that can be taken care of to optimise your Magento SEO.
Magento is one of the most search engine friendly e-commerce platforms straight out of the box, but there are several known issues that can be taken care of to optimise your Magento SEO.
Enable Server URL rewrites
The first step is to get the most recent release. Then, to get started, enable Server URL rewrites. You will find this setting under System => Configuration => Web => Search Engines Optimization. Another good thing to configure now you are on this screen is “Add store Code to Urls” under “Url Options”. In most cases it is better to set this functionality to “No”.
WWW vs non-WWW
Under “Unsecure” and “Secure” you can find the Base URL, where you can set the preferred domain. You can choose between the www and the non-www version of the URL. With changing the setting you don’t create a redirect from www to non-www or non-www to www but set only the preferred one. Therefore it is a good idea to create a 301 redirect through .htaccess with mod_rewrite. Besides solving the WWW vs non-WWW problem this redirect prevents Magento from adding the SID query to your URLs, like ?SID=b9c95150f7f70d6e77ad070259afa15d. Make sure the Base URL is the same as redirect. When editing the .htaccess file you can add the following code to redirect index.php to root.
Header Settings
By default your Magento install has the title “Magento Commerce”. For your Magento shop to get the traffic it deserves you should keep at your mind:
Search engines put more weight on the early words, so if your keywords are near the start of the page title you are more likely to rank well.
People scanning result pages see the early words first. If your keywords are at the start of your listing your page is more likely to get clicked on.
First of all you should get rid off the default title “Magento Commerce”. Go to Configuration => Design => HTML Head. Choose a good and descriptive title for your website. This title will be used for several non-content pages without custom title, e.g. “Contact Us” and the “Popular Search Terms”.
To add your store name to all page titles, including categories and products, put your store name in “Title Suffix”. It is a better idea to keep the Prefix empty, for the reasons mentioned above. Also keep “Default Description” and “Default Keywords” empty. For a non-production environment, to prevent indexing of the site, it may be useful to set “Default Robots” to “NOINDEX, NOFOLLOW” but for all other applications make sure it is set to “INDEX, FOLLOW”.
Now we are optimizing the <head>
of your web-store pages it is a good idea to add the new canonical tag. You can install the Canonical URL’s for Magento Module to add them to your head and improve your Magento SEO.
Magento turns non-set meta robots into a meta tag. This can result in some very strange behavior in the search engines, so we’ll remove it.
CMS Pages
At first sight Magento may lack some descent CMS functionality, but for most uses it will be flexible and powerful enough. One of the benefits of this simple CMS is that you can control each aspect of the pages. Once you’ve given each CMS page some decent content, pick a SEF URL Identifier and page title, (while keeping in mind the points under 1.2), and go to the Meta Data tab to write a description for each CMS page that you actually want to rank with.
You can keep the “Keywords” empty. The description has one very important function: enticing people to click, so make sure it states what’s in the page they’re clicking towards, and that it gets their attention. Thus, the only well written description is a hand written one, and if you’re thinking of auto generating the meta description, you might as well not do anything and let the search engine control the snippet…
If you don’t use the meta description, the search engine will find the keyword searched for in your document, and automatically pick a string around that, which gives you a bolded word or two in the results page.
Category optimisation
Magento gives you the ability to add the name of categories to path for product URL’s. Because Magento doesn’t support this functionality very well – it creates duplicate content issues – it is a very good idea to disable this. To do this, go to System => Configuration => Catalog => Search Engine Optimization and set “Use categories path for product URL’s to “no”.
Now it’s time to set the details for each category. Go to Catalog => Manage Categories. The most important fields are:
Meta Description
: put an attractive description here; Keep in mind that people will see the description in the result listings of search engines.
Page Title
: keep this empty to use the category name including parents categories. When you customize it, the title will be exactly like your input, without the parent category.
URL Key
: try to keep a short but keyword rich URL. Removing stop words like “the”, “and”, “for” etc. is usually a good idea. Also note that you can set this only for all store views, for a multi-language store you should keep it language independent.
For each store view you can specify the Name, Description, Page Title and Meta data. For multi-language stores this is really a great feature.
Products optimisation
Optimisation of the Products pages is similar to Categories. You can set the Meta Information for the “Default Values” and for each “Store View”. Note that for the “Meta Title”, this will overwrite the complete page title, including categories but except title prefix/suffix, and not just the product name.
An often-overlooked aspect of Magento SEO is how you handle your images. By for instance writing good alt tags for images and thinking of how you name the image files, you can get a nice bit of extra traffic from the different image search engines. Next to that, you’re helping out your lesser able readers who check out your site in a screen reader, to make sense of what’s otherwise hidden to them.
By default the images will be renamed to the product title, the same for titles and alt tags. With some extra effort you can set the titles and alt tags for each product image. Under the tab “Images” of the Product Information you can set the label for each product image, this value will be used for the alt and title tag. Of course you can do this for each specified Store View as well.
Optimised Blank Template
The default Magento skins like “Default Theme”, “Blue Skin” and “Modern Theme” don’t do a very good job in the use of headings, so from an SEO perspective, there is a lot of room for improvement there. To make it easy on you, we have developed a Blank Magento SEO Theme, based on the core Magento Blank Theme, which incorporates all the things we’ve outlined below.
Headings
By default the logo is an <h1>
, which is should only be on the front page, and on all other pages it should be no more than an <h3>
. The most important thing is to get the title of the content in an <h1>
tag, e.g. for a category page should it be the category name and for a product the product name.
The next step is to clean up the over usage of headings. It’s a good idea to get rid off the header usage in the side columns, or make the text relevant to the shop (ie. include keywords). There is no reason to add “static” and keyword less titles with an <h4>
. It is, for instance, better to change all the <h4>
tags in <div>
to <strong>
tags. Now it is time to optimize your content, at the category pages put the product names in a <h3>
and the category name in a <h1>
. On product pages, you should put the product name in an <h1>
.
Clean up your code
All that javascript and CSS you might have in your template files, move that to external javascripts and css files, and keep your templates clean, as they’re not doing your Magento SEO any good. This makes sure your users can cache those files on first load, and search engines don’t have to download them most of the time.
Aim for speed
A very important factor in how many pages a search engine will spider on your shop each day, is how speedy your shop loads.
You can do two things to increase the speed of your Magento install:
Enable caching. Go to System => Cache Management and enable all caching features
The importance of a good host and server config. With MySQL and PHP opcode cache you can improve the speed of Magento dramatically.
NOTE: there is a rumor that with the 1.3 release of Magento new functionality will be added with huge performance improvements.
Another thing to look for is the number of external files. For each file you make people download, their browser has to create another connection to the webserver. So it is a very good idea to reduce the number of external files and combine several external files in to one. By default Magento already combines (almost) all javascript files into one file.
It doesn’t do this for stylesheets though: the default template has 6 different stylesheet files. You can combine the content of these stylesheets into one new one, except for the print.css file, or you can use the Fooman Speedster module. Besides combining files, this module also compresses and caches your javascript and stylesheet files. (Please note the requirements for Speedster: mod_rewrite has to be enabled & and your server needs to have .htaccess support.
Noindex, follow for non-content pages
Install the Yoast robots meta module and make sure the settings prevent indexing of all non-content pages, like this:
Now the search engine will follow all links on these pages but it won’t show those pages in the index.
Nofollowing unnecessary links
Another easy step to increase your Magento SEO is to stop linking to your login, checkout, wishlist, and all other non-content pages. The same goes for your RSS feeds, layered navigation, add to wishlist, add to compare etc. Still there is no plugin for Magento to work this around. You had probably have to go into your template files to add nofollow to those links by hand.
Canonical URLs
To help search engines to understand the duplicate content of your pages you can suggest the preferred version of the URL for each page, using the new canonical URL tag, so you should install the Canonical URL’s for Magento module.
XML Sitemaps
XML Sitemaps are an easy way of letting search engines know where your content is, it won’t help you rank, but it might help you get indexed faster. You can create an XML sitemap manually by going to Catalog => Google Sitemap => Add Sitemap, choosing a filename, path and store view, and then pressing “Save & Generate”.
As your inventory changes, you’ll have to re-generate XML sitemaps. To make sure they’re up to date, the best way is to set up a cron job, the process of which is extensively describe here.
This article was a guest post by Joachim Houtman.
For more information on Magento SEO services please contact us.
Related articles
- Website DevelopmentOroCommerce: The gateway for B2B companiesWebsite DevelopmentWith the growing number of businesses representing themselves online, the Internet fundamentally creates a digital “shopping centre” for potential business-to-business partnerships.
- Website DevelopmenteCommerce Platform Magento vs WoocommerceWebsite DevelopmentAmongst all e-commerce platforms, magento websites and WooCommerce sites are the most popular and in demand.
- Website DevelopmentMagento SEOWebsite Development WordPress CMSMagento is one of the most search engine friendly e-commerce platforms straight out of the box, but there are several known issues that can be taken care of to optimise your Magento SEO.