- Magento Search Engine Optimization
- Robert Kent
- 642字
- 2021-04-09 23:35:44
Default <head> settings
As Magento is such a large system, every element cannot be expected to be manually entered before being used in the system. That is why Magento has a fall-back process in place for a lot of configurable options. These can be found within System | Configuration | Design | HTML Head.
For SEO purposes, the main default elements we are interested in are:
- Default Title
- Default Description
- Default Keywords
- Default Robots
These defaults are intended to display content to both users and search engines wherever we have failed to populate the relevant field in our administration 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 extremely bad for usability. For any page that we wish to perform well in search engines, we must ensure that we have a unique meta description, and if possible, a unique title. This allows search engines to better discern 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 prepopulated with the following information:
- Meta Title: If this is left unpopulated, the product name will be used
- Meta Description: If this is left unpopulated, the product description will be used
- Meta Keywords: If this is left unpopulated, the product name will be used
As our products should all be unique, this inbuilt system is a useful tool for large Magento websites that are set live without all product meta information being initially entered.
As we know, Magento should only serve up these default attributes if we have failed in some way to enter the information ourselves. To maintain a good standard of usability for these types of situations, it is a best practice to populate these fields with relevant data (this data can also be modified on a per-store basis):
- Navigate to System | Configuration | Design | HTML Head and populate the following:
An example of this could be:
Finally, within our HTML Head section is a small but extremely important option called Default Robots.
When a Magento website is under development on a test URL, we would normally find the value of this select field to be NOINDEX, NOFOLLOW, essentially blocking search engine spiders from accessing any page in the Magento system. It is therefore of paramount 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 by search engines!
A quick reference for each of the available four options is as follows:
- INDEX, FOLLOW: Allow my pages to be indexed by the search engine and analyze links found on this page
- NOINDEX, FOLLOW: Do not index my pages but go ahead and analyze links found on this page
- INDEX, NOFOLLOW: Please index my page but do not harvest any links found on this page
- NOINDEX, NOFOLLOW: Please do not index my page and do not harvest any links found on this page
Tip
As well as the <meta name="robots" />
tag, it is highly encouraged to back up any robot-specific queries with a robots.txt
file. We will talk more about the robots.txt
file in Chapter 7, Technical Rewrites for Search Engines.