Magento 2 SEO features - Pros & Cons overview
Posted on 09 March 2018
SEO is one of the most popular and discussed topics on the internet. And it is difficult to add any new details on on-page SEO for Magento 2. But in this article we focused mainly on how Magento 2 SEO features work from the technical point of view, and which pros and cons they have. Besides, we will give some useful examples and reveal issues which cannot be fixed by default Magento functionality.
Table of contents
- Meta Tags templates for Products
- Use Categories Path for Product URLs
- How to add Canonical tag in Magento 2
- Add Canonical Tag for Products
- Add Canonical Tag for Categories
- XML Sitemap
- Rish Snippets and Open Graph
- Web Server Rewrites
- Configuring URL Rewrites
- Difference between 301 and 302 redirect
- Create 301 redirect
- Permanent redirects when page URL changed
- Magento 2 performance features
- Modify robots.txt
- Other Magento 2 SEO options
- Other SEO problems in Magento 2
Meta tags templates for products
This is one of the greatest Magento 2 SEO features. Meta tags templates automatically generates product fields such as product SKU, product meta title, meta description and meta keywords. It can be configured at Stores > Configuration > Catalog > Catalog > Product Fields Auto-Generation
- Save a lot of time because making product meta tags manually is very time-consuming.
- No templates for other websites, storeviews or categories. Works only for the whole Magento 2 store.
- Meta tag templates support only 3 variables - name, description and SKU. No any product attributes can’t be used as a variable.
- Templates can be used when a product is being created. So once you have created a product, you can’t change meta tags values automatically for all products.
- Meta tag templates can’t be applied to products that are created on Magento 2 store programmatically, via some import or during Magento migration.
Use Categories Path for Product URLs
Stores > Configuration > Catalog > Catalog > Search Engine Optimization > Use Categories Path for Product URLs (Y/N) option in Magento 2 admin panel.
It adds category URL-key to a product URL on the storefront.
- Category URL key can be a useful keyword so Google can understand what this page is about.
- Category URL key can help a product page be found on Google (or other search engines) by a queries related to this category. A presence of a keyword in URL is one of the most important ranking factors.
- If product is added to 2+ categories, then it will cause two URLs for the same page. That’s a serious SEO issue, for example:
Such duplicate content is a serious SEO problem.
- Short product URL (without category) is still available by a direct link (https://website.com/the-best-pet.html), and this makes one mory URL for the same page.
- Short product URL is still used on catalog search pages
- Short product URL is still used in the sitemap.xml
How to add canonical tag in Magento 2
Use Canonical Link Meta Tag For Products
Stores > Configuration > Catalog > Catalog > Search Engine Optimization > Use Canonical Link Meta Tag For Products (Y/N) option in Magento 2 admin panel.
Perhaps, this is the most important SEO feature in Magento 2 because it eliminates the duplicate content problem. Canonical tags (rel=canonical) tells search engines which copy of a page should be treated as the original. You can learn more at https://moz.com/learn/seo/canonicalization.Example:
<link rel=”canonical” href=”http://website.com/the-best-pet.html” />
- It helps to fix the problem of duplicated content on Magento 2. So always keep this option enabled if you have “Use Categories Path for Product URLs” option enabled. Even if you don’t use category URL keys in the product URL, it’s better to enable the Canonical Tag, just in case.
- Short product URLs is always used as a canonical, even if you have “Use Categories Path for Product URLs” option enabled.
- If for some reason child products of a configurable product are configured as visible, then child products will be added to XML sitemap, but their canonical will point to itself (not to a parent configurable product). Therefore, all those child products will be treated as individual products. This will cause duplicate content problem (unless you've created a unique content for all those countless variations).
Use Canonical Link Meta Tag For Categories
Stores > Configuration > Catalog > Catalog > Search Engine Optimization > Use Canonical Link Meta Tag For Categories (Y/N) - Magento 2 SEO feature.
This option adds canonical tag to categories and subcategories pages. For example:
<link rel=”canonical” href=”https://website.com/dogs.html” />
It will use long category path as canonical tag for subcategories. For example:
<link rel=”canonical” href=”https://website.com/pets/litttle-dogs/löwchens.html” />
- Helps to avoid the duplicate content issue for category pages with URL parameters, for example pagination (https://website.com/category.html?p=2), sorting (https://website.com/category.html?product_list_dir=desc), filters (https://website.com/category.html?color=1) and list/grid mode (https://website.com/category.html?product_list_mode=list)
- No any problem is known. Please contact us if you know any such issues and we will update this blog post.
Sitemap is a XML file (or set of XML files) with an information for search engines: URLs of CMS pages, categories and products. Search engines use sitemap as one of the main sources of URLs to crawl your website. View an example
Sitemap can be configured at Stores > Configuration > Catalog > XML Sitemap. You can configure maximum file size, number of URLs in a file, sending of emails for error notifications, sitemap generation frequence and priority. There is also an option to add sitemap to robots.txt which guarantees that search engines will find a sitemap file.
Sitemap files are generated by cron daily (usually) or manually at Marketing > SEO & Search > Site Map.
- Automatic scheduled generation
- XML Sitemap supports product images
- This Magento 2 SEO featuee does not allow to add specific pages to the sitemap. For example, you have shop by brand extension that doesn’t modify Magento 2 sitemap. In this case it would be great to add brand pages to the sitemap so search engines could easier find those pages. Or you want to add your PDF manual documents to a sitemap so Google can find and index them. But Magento 2 does not have such an option.
- Links can’t be removed from the sitemap. For example, you have some test pages on your store that you don’t want to be listed in the sitemap, but Magento 2 can’t help you here.
Rich Snippets and Open Graph in Magento 2
Unlike Magento 1.x, Magento 2 has product rich snippet and Open Graph included in the box. Product rich snippet helps product pages look good in SERP - product pages will be displayed with rating, sku, and price information in Google, Bing, etc.
Open Graph is a code snippet from Google which helps Magento 2 shared pages look appealing in Facebook and Google+.Pros:
- No need to use 3rd-party extensions so product pages have rating and product price snippet in Google, Bing and Yahoo search.
- This product snippet is very limited. It does not provide other important information such as availability, description, image etc.
- There is no Rich Pins and Twitter Cards.
- There is no “breadcrumbs” rich snippet in Magento 2
- There is no “organization” rich snippet in Magento 2
- There is no “search box” rich snippet in Magento 2
Web Server Rewrites
Stores > Configuration > 'General' group > 'Web' tab > Search Engine Optimization > Use Web Server Rewrites (Y/N) - Magento 2 SEO option.
If this option is disabled, Magento 2 will use "index.php" in all store URLs, for example:
If this option is enabled, Magento 2 will omit "index.php" in the store URLs, for example:
Configuring URL Rewrites
Marketing > SEO & Search > URL Rewrites - Here you can view and create URL rewrites in Magento 2.
What is the difference between 301 and 302 redirect?
301 is a permanent redirect. It tells search engines that the page has been permanently moved to a new address, and that search engine should not crawl the old URL any more.
302 is a temporary redirect. It tells search engines that the page has been temporarily moved to a new address, and search engines should continue crawling both old and new URLs.
Generally, it’s better to use 301 redirect. You can learn more about redirects here - https://moz.com/learn/seo/redirection.
How to create 301 redirect in Magento 2?
- Go to Marketing > SEO & Search > URL Rewrites and click on Add Url Rewrite
- Select store view
- Specify the Request Path (old URL, redirect from)
- Specify the Target Path (new URL, redirect to)
- Select 301 redirect in the dropdown
- Add description (optional)
- Create 301 and 302 redirects easily - you don’t need to modify the .htaccess file
- View and search URL redirects in one place
- No any problem is known. Please contact us if you know any such issues and we will update this blog post.
Permanent redirects when page URL changed
Stores > Configuration > Catalog > Catalog > Search Engine Optimization > Create Permanent Redirect for URLs if URL Key Changed (Y/N) option in Magento 2 admin panel.
When you change product or category URL key, the system will ask you whether to apply a 301 permanent redirect from the old URL. This option affects the default state of the checkbox.
- Create redirect easily - no need to create redirect manually at URL Rewrites
- Not supported for CMS pages. For example, you have page https://website.com/cms-one. If you change the URL key to “cms-two”, the original page will give 404 error. You will have to create 301 redirect at Marketing > SEO & Search > URL Rewrites.
- Can’t create 302 redirect automatically (not recommended, though)
- If product deleted or disabled, store administrator have to create a 301 redirect to a home page manually, because otherwise product URL will redirect to 404 page.
Magento 2 performance features
Since page loading speed is a ranking factor in Google SERP, we think that Magento 2 performance optimization features should also be listed in this article.
- Magento 2 supports Varnish and Redis
- Magento 2 has a built-in Full Page Cache module both in Community and Enterprise editions (now it’s called “Magento Open Source” and “Magento Commerce” respectively)
- Magento 2 requires robust and powerful hardware
- Magento 2 does not have any performance monitoring software out of the box
- Magento 2 does not have a feature for image compression (optimization)
Modify robots.txt from Magento 2 admin panel
You can create custom instructions for robots.txt file from Magento 2 admin panel. This feature is available at Stores > Configuration > Design > Search Engine Robots > Edit Custom instruction of robots.txt File
- Now you can add instructions for robots.txt easier
- Can’t view and edit an original robots.txt file inside Magento 2 admin panel.
Other Magento 2 SEO options
- Add suffix and prefix for all page titles automatically
- Enable Google Analytics and Google Adwords from Magento 2 admin panel
- Change page URL suffixes for products and categories
- Change page-title separator
- Default Robots (index, follow) for all pages
- Automatic URL keys for products and categories
Other SEO problems on Magento 2
Magento 2 does not add hreflang tag to storefront pages. It can cause duplicate content issues.
If you have localized pages on a subdomain, then product URLs will be different, for example:https://en.website.com/dogs.html
Hreflang tag will say search engines that those URLs are different versions of one original page, thus fixing duplicate content issue.
- There is no templates for “alt” parameters of product images.
- There is no automatic filling of empty alt tags of other images on Magento 2 storefront.
- Magento 2 platform does not add rel=canonical to CMS pages. This could help search engines to understand that website.com/index.php, website.com, website.com/ and www.website.com are different versions of the same page.
- Magento 2 does not have HTML sitemap.
- There is no way to control noindex/nofollow meta robots for particular pages and page types. This feature would help you to say to search spiders (for example, Googlebot) that this page should not be indexed at all. Although Magento 2 does not allow you to create noindex instructions for particular pages, you can use robots.txt to make such instrusctions.
- Magento does not add noindex/nofollow to catalog search pages, which can cause duplicate content issue.