- Defaults Settings for Head Section
- Optimizing Category Hierarchy
- Google Analytics
- Homepage Optimization
- Optimize CMS Pages
- XML Sitemap
Default Settings for Head Section
As Magento is such a substantial framework, each component can't be relied upon to be manually entered before being utilized in the system. That is the reason Magento has a fall-back procedure in place for a lot of configurable choices. These can be found within System > Configuration > Design > HTML Head.
For SEO purposes, the main default elements we are interested in are:
- Default Title - the Default Title of the pages. This will only print to the source code when there isn't an explicit title written in.
- Default Description - the Default Title would be the name of your blog and a few featured products or categories. For example, "HockeySticks.com | Maker of fine wood sticks"
- Default Keywords - Google has stated that keywords are no longer tracked or make a difference in search results, so if you leave this blank, then so be it. It isn't a big deal.
- Default Robots - Always set this to Index, Follow for a live site, and NoIndex, NoFollow for development sites to inform Google that your site is available to be crawled and indexed.
These defaults are expected to show content to both users and search engines/web indexes wherever we have failed to populate the applicable field in our admin panel—primarily for CMS pages and categories.
In many instances, Default Title will only be used when a custom development has been made and a title is not specified within the Layout XML, the PHP controller file, or some form of admin configuration. Default Description, however, will be used whenever Meta Description is left unpopulated on a category or CMS page.
Duplicate meta description and title tags are terrible for usability. For any page that we wish to perform well in search engines, we must guarantee that we have a unique meta description, and if possible, a unique, interesting title. This permits web indexes to better perceive individual pages and also makes it easier for users who are searching for our content to instantly find the correct page among multiple results.
For products, Magento handles the default meta description and keywords tags differently; they are usually pre-populated with the following information:
- Meta Title: If this is left blank, the individual product name will be used
- Meta Description: If this is left unpopulated, the product description will be used
- Meta Keywords: If this is left empty, the product name will be used
As our products should all be unique, this built-in system is a useful tool for large Magento websites that are set live without all product meta information being initially entered. Most implementations (or migrations) usually have this information blank, so with this fallback, you always get something printed in your source code for Google/Bing.
As we know, Magento should just serve up these default attributes in the event that we have failed and fizzled out in some way to enter the information ourselves. To keep up a decent standard of usability for these types of circumstances, it is a best practice to populate these fields with relevant data. The beauty of Magento and it's scalability is that if you have multiple websites in Magento this data can also be modified on a per-store basis.
Navigate to System > Configuration > Design > HTML Head and populate the following: Set Default Title to be relevant to our store or company name
Set Default Description to contain important information, perhaps even contact information for our website. An example of this could be:
Finally, within our HTML Head section is a small dropdown menu option called Default Robots.
As I mentioned earlier in this topic, when a Magento website is under development on a test URL, we would regularly discover the value of this field to be NOINDEX, NOFOLLOW, essentially blocking search engine spiders from accessing any page in the Magento system. It is therefore of grave importance that, once the website is launched on the live domain, this select option is set to INDEX, FOLLOW, or our Magento website may never be indexed/listed by search engines.
A quick reference for each of the available four options is as follows:
- INDEX, FOLLOW: Allows your website's pages and content to be indexed by the search engine and analyze links found on this page. This is the setting you want your website to be on 99% of the time.
- NOINDEX, FOLLOW: Tells Google "Do not index my pages but go ahead and analyze links found on this page." I can't think of a time this would be used.
- INDEX, NOFOLLOW: Please index my page but do not follow any links found on this page. You wouldn't use this really unless you had a link farm type site and you didn't want any link juice to pass to links on your page.
- NOINDEX, NOFOLLOW: Please do not index my page and do not harvest any links found on this page, this is set to "go off the grid".
Have you read the other articles about how to optimize your Magento or eCommerce store for SEO? Catch up now. Read the full Magento SEO Guide.
Optimizing Category Hierarchy
Typically, the most competitive keywords on your website (regardless of how huge or tiny) will be classified as broad keywords, implying that their relevance could be attributed to an assortment of similar terms. This is the reason it makes sense to use top-level or parent categories as a basis for our broad phrases.
To utilize an example, Lighting would be an ideal top-level category to contain subcategories such as ''LED Lighting", "Overhead Lighting", and "Lamp Lighting", with content on our top-level category page to highlight these subcategories. Within the Magento admin panel, go to Catalog > Manage Categories so we can arrange our category structure to match our keyword relevance and broadness.
In a perfect world, we would plan out our category structure before implementing it; unfortunately, that is not always the case (actually it is typically not the case; most eCommerce managers don't even consider this). If we need to change our category structure to better match our SEO strategy, Magento provides a straightforward approach to adjust our category hierarchy (layout).
For example, say we currently have a top-level category called Lighting, and within this category, we have LED Lighting, and we decide that we're only optimizing for LED Lighting instead of simply "Lighting"; we can use Magento's drag-and-drop functionality to move LED Lighting to become a top-level category.
To do this, we would have to perform the following steps:
- Navigate to Catalog > Manage Categories.
- Drag our LED Lighting category to the same level as Lighting.
Well, lookie there! Look at your URL bar in on the front-end of the website and you will see that our URL has now changed from http://www.mydomain.com/lighting/led-lighting.html to http://www.mydomain.com/led-lighting.html.
We will also notice that our old URL now redirects to our new URL; this is due to Magento's pretty awesome internal URL Rewrite System (but it does have it's quirks that I can get into later in another article). When moving our categories within the hierarchy, Magento will recall the old URL path that was specified and automatically create a redirect to the new location. You don't have to do anything if you are properly dragging categories around.
This is fantastic for our SEO strategy as 301 redirects are vital for passing on authority from the old page to the new.
A 301 redirect is one of the most useful tools in maintaining a search engine's understanding of our website pages.
If we wanted to have a look at these rewrites ourselves, we could perform the following steps:
- Navigate to Catalog > URL Rewrite Management.
- From the table, we could find our old request path and see the new target path that has been assigned.
Not only does Magento keep track of our last URL, but any past URLs also become rewritten, meaning you can make infinite category changes depending on the top-level keywords you want to rank for. It is therefore not surprising that a medium to large Magento store with many SKUs, products, and categories could have thousands upon thousands of rows within this table, especially when each URL is rewritten on a per-store basis. If you have a smaller store it isn't going to be a big deal, but depending on the size of your catalog one single change to a category could take longer to save. Keep things simple if possible.
Another important point to note is that your category "URL key" (attribute url_key) may change depending on whether an existing category with the same URL key at the same level had existed previously in the system. If this circumstance happens, an automatic incremental integer is appended to the URL key, for example, led-lighting-2.html. Magento Enterprise Edition has been enhanced to only allow unique URL keys. You can't have duplicate URLs. While that does help your SEO inherently you might not know why you are being denied the ability to save a category. Stop and look if there is already a category named LED lighting.
Well, that is it for optimizing your category hierarchy and what you should focus on. Take a look at your category structure and make sure that the broad keywords you are trying to rank for areas close to the top of the hierarchy as possible. You want them to be Level-0 (top-level) or Level-1.
SEO would be irrelevant if there wasn't a way to analyze the stream of traffic through your optimized Magento or eCommerce website.
There are numerous analytics bundles, services, and tools out there, but the most popular by far is Google Analytics (http://www.google.com/analytics/).
Keeping in mind the end goal to set up Analytics adequately on our Magento store, we will need to enter our Google Analytics Account Number (tracking ID) in the admin panel. It is also recommended that we activate eCommerce tracking from within our Google Analytics account.
To do that follow the steps below:
- Log in to our Google Analytics account and navigate to your website's account page by clicking on the proper folder.
- Click on Admin located in the header.
- Within this section, we should see three columns: Account, Property, and View. If we wish to find out our Tracking ID, click on Property Settings under the Property column; we can then copy/paste our Tracking ID from here.
- To turn on E-commerce tracking, we should click on View Settings within the View section and then scroll down to Ecommerce Settings and ensure that the toggle is set to ON.
- Now that we have our tracking ID and have enabled E-commerce tracking in Google Analytics, we should navigate to our Magento administration panel and then go to System > Configuration > Google API > Google Analytics.
- Paste in our tracking ID into the Account Number field, set Enable to Yes, and then click on Save Config.
Since we have set up analytics, we will discover a ton of information is now available to us (assuming you have given Google time to index your site and collect some good data), including the ability to track revenue by source and to work out our most effective conversion paths.
<!-- BEGIN GOOGLE ANALYTICS CODEs -->
// our <script> tag containing our tracking code here
<!-- END GOOGLE ANALYTICS CODE -->
Here's an example:
On the off chance that we don't see this code, it may be the case that the template file has been altered and the tag that includes our Google Analytics code has been removed. If this is the case, double-check your standard template files (1column.phtml, 2columns-left.phtml, 2columns-right.phtml, and 3columns.phtml, usually found within app/design/frontend/yourpackage/yourtheme/template/page) to very that these two snippets of code are in place and working.
<?php echo $this->getChildHtml('after_body_start') ?>
<?php echo $this->getChildHtml('before_body_end') ?>
Lastly, Conversions will not be tracked if the proper code is not added to the success page once someone places an order.
- Generally, adding the tracking code to the Magento HTML Head through Magento’s configuration (Configuration > Web > HTML Head) should be enough. If for whatever reason it doesn’t seem to be tracking on the success page (sometimes a theme or extension will overwrite parts of Magento’s default functionality), then you might have to add the code manually.
- To do this, using your FTP/SFTP client, navigate to /app/design/frontend/template/checkout/success.phtml
- Open that file in an editor and add the Google Analytics tracking code to the very bottom of the file. Save it, and reupload it.
Don't worry you can be excused for thinking that improving our most competitive keyword (super broad keywords such as candy, or hockey sticks) on the home page would lead to the best results. Be that as it may, when you take into account the relevance of our home page, does it truly match our keyword? The answer is; No, it normally doesn't.
Much of the time, the home page should be utilized solely as a place for building your brand identity. Our brand identity is the heart and soul of your business and it is how customers will remember us long after they've purchased our goods and exited our website. Think about some of the big brands and how they make you "feel". McDonalds, Starbucks, Coca-Cola, Amazon, Wal-mart. They all elicit a different emotional response and for some it is happy and for others it is stress. Now take some time to think about how you want your online store to elicit emotions and that will start you off to create your brand identity.
To move forward and optimize your homepage you can use high-level keywords on your homepage that match the brand. For example, if you are the Canadian Hockey Stick Company it might be acceptable for you to use the words "Hockey Stick" on your homepage. It would also work out if you were selling a single product on a one-pager (a website without many product detail pages).
Keep in mind the buying intent of your website traffic. The buying intention of our visitors will almost certainly differ between your homepage and your product details page. If you think about your website as a funnel with the Homepage being at the top of the funnel and the checkout success page being the bottom of the funnel the buying intent is lowest at the top and the highest at the bottom. Typically, a user entering our website via a broad phrase will have less of an intention to buy our products than a visitor entering our website through a more specific, product-related search term. This is especially true if you have a site that provides a lot of valuable content to visitors other than just buying items. An example here would be you offering a fun fact or history lesson with each hockey stick that you are trying to sell. While the goal is to convert people and earn revenue they will also learn about the history of hockey and the stick manufacturer.
In summation, you want to focus your meta descriptions and meta title on broad keywords to bring in high level, low buying intent customers. Ideally, if you are running ads or optimizing correctly people will not enter through your homepage as much as category or product pages, but people tend to fall back to the homepage as a warm cozy blanket.
Optimize CMS Pages
Out of the box, the home page of a Magento community/enterprise store is a CMS page with the title "Home Page". The page that is served as the landing page can be configured within the Magento Configuration under System > Configuration > Web > Default Pages.
The most imperative piece of a CMS page setup is that its URL key is always relative to the website's base URL. This means that when creating CMS pages, you can manually choose how deep you wish the page to exist on the site. This gives us the ability to create as many nested CMS pages as we like. From an SEO perspective the higher the page is in the hierarchy the more easily it is to rank the page higher. Truly, you don't want your FAQ page to be the number one ranked page on your site, but it doesn't hurt to get people on your site however possible.
Another important point to note is that, by default, CMS pages have no file extension (URL suffix) as opposed to the category and product URLs where we can specify which extension to use (such as HTML or HTM, etc.)
For CMS pages, the default optimization methods that are available to us are found within the Page Information tabs after selecting a CMS page:
Under the Page Information subtab (see the screenshot above) in which y0u can choose our specific Page Title and URL key (www.google/urlkey). You want your page title to be the keyword that you are trying to rank the page for. For example, a CMS/content page about golf balls. You would want to name your CMS page, Tips for Golf Balls as that could potentially be a longtail keyword search.
Furthermore, under the Content subtab, we can enter our Content Heading (by default, this gets inserted into a <h1> tag) and enter our body content that is actually on the page. Again keep in mind that this page needs to be kept to the topic that is featured in the page title and the content heading. If you are writing about a lot, the page may need two or three different pages.
Under the Meta Data subtab, we can specify our keywords and description. Keywords aren't utilized as much in search engine optimization as about 5 years. Google has stated it isn't considered a keyword meta in its algorithm.
As specified beforehand, we would focus on optimization on these pages purely for the intent of our visitors. If we were not using custom code blocks to display product information we would not optimize these information pages for keywords relating to purchasing a product but rather for content. If you don't have a blog on your website these pages would serve for editorial content and other "blog" type content.
Have you read the other articles about how to optimize your Magento or eCommerce store for SEO? Catch up now. Read the full Magento SEO Guide.
We all realize that web indexes can recognize pages on a site through its internal (and external) linking structure. Nonetheless, the most comprehensive and accessible strategy of providing our site structure to search engines, by a long shot, is a valid XML sitemap that is transferred to a search engine's Webmaster Tools (for example, Google Webmaster Tools or Bing Webmaster Tools).
Naturally, the development team behind Magento understood that manually creating an XML sitemap from steadily evolving pages, products/items, and category URLs would be an incomprehensible task. Therefore, they built their own special XML Sitemap Generator.
With a specific end goal to create our XML sitemap, we must first configure its contents. Navigate to System > Configuration > Google Sitemap and configure Frequency and Priority for our fundamental main page types. We can likewise arrange how frequently we need to produce our sitemap.
Contingent upon our Magento store set up and content, we may decide that our categories are the most important pages. For Magento, your category pages are gold as they're the most optimized pages for broad search terms and we want search engines to find and index them first. Our next most essential pages would be our individual item/product pages; we want those to appear in search engines for customers searching specifically for our product names. This typically is more important for companies that develop their products (that they market) or resell brands such as Air Jordan or Wilson Footballs. It might not be as important to companies that white label clothing with weird names like "Whispy Outside Tori Tank" because people will use broad search terms like Tanks Top Pink. The page type with the least priority would normally be our CMS pages.
As mentioned previously, the home page in Magento is classified as a CMS page; subsequently, based on our specifications, it will receive a lower priority. Also, the home page URL or will be set as http://www.mydomain.com/home, which is not how we want our home page to appear.
The priority is simply a value that is passed to Google for it to prioritize the list of pages it will index; it will then (supposedly) do so programmatically.
Based upon our chosen SEO campaign, we would set the priority higher for those pages we are optimizing. Therefore, if we are optimizing our categories and products more than CMS pages (recommended) we would set their priorities to match the following:
- Within Categories Options, set Frequency to Daily and Priority to 1.
- Within Products Options, set Frequency to Daily and Priority to 0.8 (or anything less than 1 and more than we are about to set the CMS pages too).
- Within CMS Pages Options, set Frequency to Weekly and Priority to 0.25.
- Within Generation Settings, set Enabled to Yes, Start Time to 01 00 00 (01:00 a.m. or you can use another time that your traffic is at it's lowest), and Frequency to Daily, and enter your e-mail address into the Error Email Recipient field.
- Click on Save Config.
In the end, we should have something that looks like this:
In order for our generation settings to automatically generate our sitemap, the Magento CRON must be enabled. A quick tutorial on how to do this can be found here: Magento Cron
Log in to your Magento admin interface and go to: System > Configuration > System. Then using the ‘Cron (Scheduled Tasks)’ tab enter the following information:
Generate schedules every: 1
Schedule ahead for: 1
Missed if not run within: 30
History cleanup every: 120
Success history lifetime: 120
Failure history lifetime: 120
You can then set cron jobs to run at virtually any interval. I have mine set to 15 minutes for most of my clients due to their use of custom modules related to scheduled tasks.
Our next step is to make sure that we have an XML sitemap that will be updated based on these settings. To do this, we need to first create one as follows:
- Navigate to Catalog > Google Sitemap and click on Add Sitemap.
- For Filename, enter sitemap.xml.
- For Path, we can specify a path, but we would usually place an XML sitemap on the root of our website (enter /).
- If we have multiple store views, we can enter a specific sitemap for each Store View (in which case we would change our filename to suit the convention, for example, sitemap_en.xml for English).
- Click on Save & Generate.
- This should generate an XML sitemap in our chosen path with our chosen filename. We can test this by visiting our path/filename in the URL, for example, http://www.mydomain.com/sitemap.xml.
If an error message appears informing you that the specified directory is not writable, please make sure that the folder specified under Path has sufficient privileges to allow the system to write a file—usually 775, or failing that, 777. Be careful that you don't do 777 on folders that have sensitive information, just in case you have data issues and/or you have more people accessing your server besides your direct team. If a folder is marked 777 people can update and overwrite the whole directory.
Once we have confirmed that our XML sitemap is set up and working correctly, we now need to make sure that it has been submitted to our chosen search engine—Google.
There are two ways to do this, but for safety's sake, we would usually perform both:
- Open the robots.txt file and add in Sitemap: http://www.mydomain.com/sitemap.xml.
- Log in to Google Webmaster Tools (www.google.com/webmasters/tools/), click on our website (or add our site if we need to create one), and then, within Crawl, click on Sitemaps and Add/Test Sitemap.