>Magento 2 SEO Guide – The All-in-One Definitive Guide [2019]

Magento 2 SEO Guide – The All-in-One Definitive Guide [2019]

In the e-commerce world, getting to the top of the search engine ranking plays an important part in sales conversion. Search engine optimization, thus, has always been a tough challenge for any online store.

In this article, we will provide a Magento 2 SEO Guide with all default features that you can configure from the Magento 2 admin panel and introduce you a Magento 2 SEO extension that helps you to overcome the limitation of the default features along with more advanced functions. 

A. SEO for Magento 2 

I. What is SEO? 

As you know, SEO stands for Search Engine Optimization – a technique to help websites increase traffic through organic search results. By doing good SEO, a website can be highly evaluated by search engines (Google, Bing,…) and get high rankings on Search Engine Result Pages (SERPs).

II. Is SEO important to Magento 2 store? 

SEO plays a very important role not only for Magento 2 stores but also for every website of any Ecommerce platforms. SEO for Magento 2 helps to increase the quantity and quality of traffic, which brings potential customers interested in products or services of the Magento 2 store and generate revenues.

Also, making a website SEO-friendly improves user experience and usability of the website, leading to a better shopping experience. 

III. How does default Magento 2 support SEO? 

Till now, the default Magento 2 SEO settings support quite well the basic needs of on-page SEO. You can easily navigate to Marketing ⇒ SEO & Search to explore what functions default Magento 2 supports store owners. In addition, there are a lot of other SEO features you need to spend more time discovering and configuring for your site.

However, as mentioned above, the default functions in Magento 2 SEO guide are still limited, you need to install a Magento 2 SEO extension if you want to make your site completely SEO-friendly. 

B. Default Magento 2 SEO Guide

I. Meta Data in Magento 2 SEO guide

Metadata is the foremost fundamental setting when it comes to Magento 2 SEO guide. This information is shown on the search result page and affects how the search engine crawlers index your site. While setting up your store, you should consider using keyword-rich data for better SEO performance.

For product page metadata, you can go to Catalog ⇒ Product ⇒ Choose a product ⇒ Search Engine Optimization to start configuring. 

1. Meta Title

The Meta Title is displayed as the title of your product page in the search result. Try to include the high-value keywords you want to aim for the page in this field to get better recognition from web crawlers. Choose wisely as you are limited to under 70 characters.

meta-data-magento-2-seo-guide

2. Meta Keywords

Unlikely the meta title, you have no maximum limitation for meta keywords. And they are not shown in the SERPs. Fill in all the keywords of the page for the crawlers to know what your product is about. However, don’t go over-filling and come up with the related ones only.

3. Meta Description

The maximum allowed chars in default Magento 2 is 255. And you may see an instruction text to optimize between 150-160 chars. Wise optimization can raise more clicks through the search. Not just keywords include some phrases to attract more customer such as support policy or promotion.

4. Mass Settings for Product Meta Data

In case you have a large scale site with thousands of items to manage, the below settings of Magento 2 SEO guide may be a great help. It sets a template for metadata of products at a global level.

Go to Stores ⇒ Configuration ⇒ Catalog ⇒ Catalog ⇒ Product Fields Auto-Generation

Here, you can make a sample for meta title, description, and keywords for all products in your Magento 2 store.

default-meta-tag-magento-2-seo-guide

By default, Magento 2 takes placeholder such as {{name}}, {{description}} or {{sku}} for the meta information. 

When you are using this Product Fields Auto-Generation feature, the SEO suggestion for the character limit of metadata above is still applied. Thus, be careful if you have a too-long product description as the meta.

*NoteLimitations of Mass settings for product meta data in default Magento 2 SEO guide:

  • You can only use 3 placeholders as mentioned above to create a meta-template of products. Other placeholders such as  {{color}}, {{country_of_manufacture}}, , {{gender}}, {{material}}, {{short_description}}, and {{size}} haven’t yet supported.
  • It works only at the level of Global scope. Therefore, there are not any templates for websites, stores or store views or even categories to apply.
  • It does not support automatically changing meta tags for existing products, but the template is only applied to newly created products.
  • It does not apply to products that are imported, migrated or programmatically created.

5. Meta Data for Categories, CMS Pages and Homepage in Magento 2 SEO guide

For categories, you go to Catalog Categories and create a new category. Navigate to Search Engine Optimization; you do similarly to adding metadata for products with meta title, meta description, and meta keywords.

For CMS pages, you can easily include their metadata by going to Content Elements Pages and select Search Engine Optimization as well.

For Homepage, you also create a meta title by navigating Content ⇒ Page ⇒ Homepage ⇒ Page Information (similar to CMS pages) and customize your page title as you want. This page title plays an important role in ranking in Search engine search results and drawing customer attraction.

homepage-magento-2-seo-guide

To sum up, you are given 2 choices to change metadata: a manual way for each product and an automatic way for all products at once based on a template you set up in advance. Each method contains particular advantages and disadvantages.

Therefore, it is better to take careful consideration before making your decision to choose which one is the most suitable way.

Besides, you can also use Magento 2 SEO Module to auto-add meta description, meta title, meta keywords and description for products and categories, overcoming the limitation of default Magento 2 SEO guide. 

II. Unique Content with Canonical Tag in Magento 2 SEO  Guide

Having unique content is one of the key factors in SEO. Search engine crawlers take it low when there are multiple URLs pointing to the same or similar content.

For an e-commerce site like Magento 2, this is a common problem because of the high variation in URLs. Google doesn’t like it at all and considers duplicate content in this case. As a consequence, Google will underestimate your content due to no uniqueness and you can drop out of product page rankings on Search Engine Result Pages (SERPs). 

For example: 

bsscommerce.com/magento-2-force-login-extension.html

bsscommerce.com/magento-2-extensions/magento-2-force-login-extension.html

bsscommerce.com/magento-2-extensions/magento-2-b2b-extensions/magento-2-force-login-extension.html

⇒ All of these 3 URLs point to the identical content (Force Login extension page).

To solve this, you should explicitly tell Google which URL is authoritative (canonical) for that page. If you do not do this explicitly, Google will choose for you or might consider them both of equal weight, which might lead to unwanted behavior.

That’s also the benefit of the canonical tag. The rel=canonical <link> tag can be added to the code for all duplicate pages, pointing to the canonical page.

In the backend, admins find a solution to duplicate content issue under Stores ⇒ Configuration ⇒ Catalog ⇒ Catalog ⇒ Search Engine Optimization.

1. Categories Path for Product URLs Optimization

In Use Categories Path for Product URLs, this option decides whether category paths are included in product URLs. For example, a Chaz Hodie is under both the Eco-Friendly and Hoodies category. If you choose Yes in this option, there may be 2 URLs pointing to the same product they are:

http://yourstore.com/eco-friendly/chaz-hoodie.html

Or http://yourstore.com/hoodies/chaz-hoodie.html

Hence, the suggested option for this is No. Then, there is only one URL http://yourstore.com/chaz-hoodie.html when a customer accesses to the item from any categories.

product-canonical-tags-magento-2-seo-guide

In case you want to set Yes for this config, you must enable canonical to avoid duplicate content issues.

2. Canonical Tag for Products and Categories

In Use Canonical Link Meta Tag For Categories, you can choose Yes to add the canonical tag for categories with product_list_mode=list, product_list_order=name, and other variations. This is extremely helpful when there are various URLs with the same content from the filter and sorting options. A rel=canonical tag will be automatically placed.

The same goes for Use Canonical Link Meta Tag For Products. If this option is enabled, search engines will index product pages only using the domain-name/product-URL-key format.

*Note: There is no configuration to enable canonical tags for CMS pages in the default Magento 2 SEO Guide.

III. URLs Optimization in Magento 2 SEO guide

1. URL suffix

The suffix is a part of the URL after the URL key. It is the .html or .htm part. In search engine optimization, it is recommended that the suffix is excluded from the URL for the following reasons. Firstly, this information offers no value to users nor search engines. Moreover, it needlessly increases the length of your URL.

url-suffix-magento-2-seo-guide

To do it in Magento 2 SEO guide, access Stores => Configuration => Catalog => Catalog  => Search Engine Optimization.

In Product URL Suffix and Category URL Suffix, you can set any suffix or remove them. When removing the .html from the URL, your old links including the suffix turns to a 404 error page. Thus, you may need some consulting from SEO experts on how to fix this.

2. URL Rewrite and Redirect

A good and friendly URL is one of the most important factors that are used to rank a website by the search engines.  According to Google, “A site’s URL structure should be as simple as possible. Consider organizing your content so that URLs are constructed logically and in a manner that is most intelligible to humans”.

Compared to a URL like www.example/men/product35574.com, this URL www.example/men/shoeA.com is much more friendly and readable to both search engines and users. Hence, URL Rewrites is used to create better URL keys by rewriting bad URLs, and changing them into friendly ones for search engines’ bots and user experience.

2.1. Configure URL Rewrite

URL Rewrite is a familiar technique widely used by a lot of websites. It lets you rewrite the complicated URLs generated by systems into a new one which is better for your ranking as well as customer experience.

New URL keys now can be shorter, cleaner and make more sense than the old ones.

The default settings in Magento 2 SEO Guide already has the product and category URL named based on the product and category names. However, the admins can also change this setting for better SEO at the backend by optimizing a more friendly URL.

By default, URLs contain the file name index.php (www.abc.com/index.php/men), which is useless to both users and crawlers. To remove this, follow this instruction

url-rewrite-configs-magento-2-seo-guide

Go to Stores ⇒ Configuration ⇒ General ⇒ Web ⇒ Search Engine Optimization. Set Use Web Server Rewrites to Yes and the index.php will be auto removed (www.abc.com/men).

Moreover, URL key rewriting can be used for a keyword-rich and search-friendly links. As changing the URL makes your previous URLs lead to a 404 error page, redirecting optimization is also required at the same time. Below is how to rewrite URLs and set up redirects for SEO in Magento 2 SEO Guide.

  • Automatic redirects settings

Under Stores ⇒ Configuration ⇒ Catalog ⇒ Search Engine Optimization, you can find an option named Create Permanent Redirect for URLs if URL Key Changed. Here, select Yes to enable auto redirect when the URL is replaced.

redirect-category-setup-magento-2-seo-guide

  • Product URL redirect

In order to change the URL key for a specific product, access Product ⇒ Catalog then select the items you want to configure. In Search Engine Optimization section, update the URL Key as needed, using all lowercase characters and hyphens instead of spaces.

Make sure that the Create Permanent Redirect for old URL checkbox is selected. Tap Save and clear the cache to complete this process.

permanent-redirect-magento-2-seo-guide

  • Category URL redirect

The same goes for category URL rewrite optimization. Under Product ⇒ Categories, find the category in the tree. In the Search Engine Optimization section, write the new URL Key, using all lowercase characters and hyphens instead of spaces.

Make sure that the Create Permanent Redirect for old URL checkbox is selected. Tap Save and clear the cache.

category-url-rewrite-magento-2-seo-guide

*Note: This permanent redirect is not applied to CMS pages. If you want to change the URL key of a CMS page, you have to create 301 redirects at Marketing ⇒ SEO & Search ⇒ URL Rewrites.

Also, in case a product is deleted or disabled, a 301 redirect to the homepage is necessary to do. Otherwise, the product URL will redirect to a 404 page.

3. Create a URL Rewrite

You go to Marketing ⇒ SEO & Search ⇒ URL Rewrites, and you can see a grid table of default URL Rewrites.

You click Add URL Rewrite button.

In Create URL Rewrite, you choose Product from the dropdown list.

You click a product and click Skip Category Selection button under the category tree to go to URL Rewrite Information.

url-rewrite-magento-2-seo-guide

In Store: you choose a Magento level that URL Rewrite is applied. If you have multiple store views, let’s select Store. Otherwise, the URL rewrite is created for store view level.

In Request Path: you enter the new path for the product. Please add suffix with the new path if it has.

*Note: The Request Path must be unique for the specified store. If there is already a redirect that uses the same Request Path, there is an error when saving the redirect. The previous redirect must be deleted before you can create a new one.

In Redirect Type: You can choose No, Permanent (301) and Temporary (302).

  • Permanent (301) means that product URL is rewritten permanently and search engines can retain page rank information for permanent rewrites.
  • Temporary (302) means that product URL is rewritten for a limited time and search engines don’t retain page rank information for temporary rewrites.

In Description: you can give some description of this URL Rewrite.

Then, you save the configuration and see the URL Rewrite in the grid table.

IV. Site Indexing in Magento 2 SEO guide

Indexation from search engine crawlers has a critical effect on SEO. To support this procedure, XML sitemap and robots txt file were created. These files will be submitted to the search engines to read and decide how your store is indexed.

1. XML Sitemap 

An XML sitemap in Magento 2 SEO Guide is an XML file listing all URLs of a website that instructs crawlers of search engines (Google and Bing) to read the content on the website. Hence, that’s how the content of your Magento 2 store is read and ranked on the search results.

You may take a look at this article to know more about the benefits of an XML sitemap: Why sitemap is a must-have in Magento 2.

By default settings in Magento 2 SEO guide, the sitemap.xml file is saved in the root directory of your installation. The configuration gives you the ability to set the frequency of the updates, and the priority for each type of content.

Your sitemap should be updated as frequently as the content on your site changes, which might be daily, weekly, or monthly. 

Please navigate to Stores ⇒ Configuration ⇒ Catalog ⇒ XML Sitemap

1.1. Page type options

In general, the default Magento 2 allows admins to set up the Frequency and Priority for Categories, Products, and CMS Pages.

xml-sitemap-page-magento-2-seo-guide

In Frequency: select an option to define how often the sitemap is updated. (Always, Hourly, Daily, Weekly, Monthly, Yearly and Never). 

In Priority: enter a value between 0.0 and 1.0 to determine the priority of categories/ products/ CMS pages updates in sitemap about other content. 

In Add Images into Sitemap field of the Product Options: let admins add product images into the XML sitemap: 

– No: Do not add images to the sitemap.

– Base Only: Only add a base image of products into the sitemap.

– All: Add all images of products into the sitemap.

1.2. General settings 

xml-sitemap-magento-2-seo-guide

In Enabled: set Yes to make the XML sitemap be generated automatically.

In Start Time: set the time up to the hour, minute and second to update the XML sitemap.

In Frequency: select Daily, Weekly, or Monthly.

In Error Email Recipient:  enter an email to receive a notification email of error happening during an update.

In Error Email Sender: select a sender in the store contact as the sender of the error email.

In Error Email Template: select an error email template. 

1.3. Sitemap file limits 

xml-sitemap-other-configs-magento-2-seo-guide

Following Sitemap protocol for a standard XML sitemap in Magento 2, a sitemap should not be larger than 10MB and contains over 50 thousand links. In the default value of the XML sitemap in Magento 2, you can notice that these rules are also applied.

In both Maximum No of URLs Per-File and Maximum File Size, admins can set the value they want. However, the Sitemap protocol should be followed for the best indexing of the search engine crawlers.

You may wonder what will happen if my XML file crosses the limit. In that case, another XML file will be created and continue listing the rest of the links in your store. Thus, there may be multiple XML files in case your store contains a massive number of web pages.

1.4. Search Engine submission 

In Enable Submission to Robots.txt: select Yes if you use a robots.txt file to give instructions to search engines crawling your site.

However, there are some things to remember:

  • You cannot add specific pages to the XML sitemap
  • You cannot remove links from the sitemap
  • You cannot have choices to select which product types to be added to the sitemap

2. HTML Sitemap 

Default Magento 2 SEO Guide does not support HTML Sitemap at all. If you want to include it on your website, please explore Magento 2 SEO module!

3. Configure robots.txt file

The robots file is an instruction to the crawler bots on how to index your site. This instruction resides in the root folder and is followed by the search engine. To set up, go to Stores ⇒ Configuration ⇒ General ⇒ Design ⇒ Search Engine Robots.

For newer Magento 2 versions, you can find this file by following this path: Content Configuration (choose a store view) Search Engine Robots:

robot-txt-magento-2-seo-guide

In Default Robots, admins can select among:

  • INDEX, FOLLOW: Instructs web crawlers to index the site and to check back later for changes.
  • NOINDEX, FOLLOW: Instructs web crawlers to avoid indexing the site but to check back later or changes.
  • INDEX, NOFOLLOW: Instructs web crawlers to index the site once, but do not check back later for changes.
  • NOINDEX, NOFOLLOW: Instructs web crawlers to avoid indexing the site and do not check back later for changes.

*Note: Default functions in Magento 2 SEO Guide does not include setting up Robots for each specific page.

If you want to set a specific instruction, changes can be easily made at Edit Custom instruction of robots.txt file.

V. Other features in Magento 2 SEO Guide

1. Image Alt Text 

Alt text plays an important role in helping search engines understand the content of images and give them a weight of rankings in SERPs. The reason is that search engines cannot know what your images tell about without alt text. Hence, adding Alt text for images on your website is necessary if you want to get higher rankings. 

In Magento 2, you can manually insert Alt text for every image on your site, from product images to the store logo. 

  • Alt text for the store logo

Please go to Content ⇒ Design ⇒ Configuration and find a store view you want to edit. 

In Header, enter Alt text in the Logo Image ALT section. 

logo-magento-2-seo-extension

  • Alt text for product images or other images on the content pages 

For product images, just navigate to each product edit page, then select Image and Video and click each image to enter the alt text.

For other images on the content pages, you can add the alt text when inserting images conveniently. 

2. Rich Snippets in Magento 2

As you know, Rich Snippets help your website stand out in SERPs with additional information such as rating and review. However, this default function is still limited due to the lack of many other rich snippet features such as price, availability and so on. To show more rich snippets, please explore Magento 2 SEO Tool

3. Pagination Optimization

As a part of Magento 2 SEO guide, pagination is also optimized with a canonical for SEO-friendliness. For example, such URL as http://abc.com/products.html?p=2 is pointed to http://abc.com/products.html. It means that the URL points to its category.

4. Performance

As you know, site performance is one of the most important factors to evaluate rankings on SERPs. Magento 2 also supports some functions to make website speed faster such as Varnish and Redis,  Javascript, CSS and HTML minify feature, Javascript and CSS merge feature, a built-in Full Page Cache module and so on.

5. Google Analytics 

Google Analytics is an analysis tool that provides you with user insights on how they find out and use your website. Using Google Analytics, you can know such information as views, revenue, customer behavior, and so on.

Step 1: Sign up for Google Universal Analytics

You need to access the Google website, and create an account for Google Universal Analytics.

Step 2: Configure on Magento backend 

Please navigate to Store ⇒ Configuration ⇒ Sales ⇒ Google API.  

google-analytics-magento-2-seo-guide

  • Choose Yes in Enable. 
  • In Account Number: enter your own account number which you can get right after signing up the account. (Tracking ID).
  • In Enable Content Experiments:  Set Yes to do A/B testing and other performance tests on your content. 

6. Google Adwords 

To advertise products on Google Search Result Pages (SERPs) or on other pages in the Google Network Display, we need to use Google Adwords service to set up advertisement campaigns. 

Step 1: Create Google AdWords campaigns

Please navigate to Google AdWords and create an account.

To add a new campaign, read this instruction

To track conversions brought via Google AdWords, you need to set up conversion tracking of your campaigns: 

  • Click Tools ⇒ Tools and Analysis tab and select Conversions. You are redirected to All conversions page, then click on the Conversion tab and continue to click on the +Conversion button. 
  • Choose Website as the conversion source.
  • Enter a name for the conversion action you want to track.
  • Click Done 
  • Click Value. Then if applicable, assign a value to the conversion. For example:

+ If you make $5 on each sale, choose “Each time it happens”, and assign a value of $5.

+ If the value of each sale varies, leave the value blank.

  • Continue to tab Conversion window, finish necessary settings.

Finally, click the Save and Continue button. 

Step 2: Get your conversion tag 

Go to Install your tag section and determine how many conversions to count on Page load.

Add the Google Site Stats notification to the conversion page. The notification will be displayed in the lower corner with a link to Google’s security standards and cookie usage.

To manage your AdWord tags, you can select one of the following options: 

  • Choose Save instructions and tag to add the script to your store by yourself.
  • Choose Email instructions and tag to get other people to add the script to your store. 

Then, click Done. 

Step 3: Set up on Magento store 

Navigate to Store ⇒ Configuration and choose store view to set up if you want.

google-adwords-magento-2-seo-guide

In Sales, select Google API and go to Google AdWords section: 

Set Yes for Enable field

Enter Conversion ID that you get from Google AdWords script.

For Google Site Stats notification, you need to make the following settings: 

In Conversion Language: select a language that is identified in your Google AdWords script.

In Conversion Format: enter a number which specifies Google Sites Stat notification on the conversion page.

  • 1- show a one-line notification along with a link of reference to read about Google Tracking. 
  • 2- show a two-line notification along with a link of reference to read about Google Tracking. 
  • 3- no customer notification. 

In Conversion Color: enter a color code for the Google Site Stats notification label.

In Conversion Label: Enter the encrypted text.

In Conversion Value Type

  • If you choose Dynamic, a conversion has occurred based on the dynamic Order Amount value.
  • If you choose Constant, a conversion has occurred based on a specific value entered.

Finally, click the Save Config button.

Step 4: Track status config verification 

You can track the status in your Google AdWord dashboard: 

  • Unverified 
  • No recent conversions
  • Recording conversions

C. Magento 2 SEO Extensions

I. What is Magento 2 SEO Extension?

As mentioned above, default features in Magento 2 SEO Guide are still limited and it would be better if you install Magento 2 SEO extension to equip enough necessary functions. 

Magento 2 SEO extension developed by BSS is an all-in-one SEO solution for every website. It includes all important features to make a website SEO-friendly such as: 

  • Advanced HTML and XML sitemap
  • Canonical tags and Hreflang tag to avoid duplicate content 
  • Meta tag and ALT tag template 
  • Rich snippets to make websites highlighted on SERPs
  • Advanced breadcrumbs  
  • 301 redirects and external links 
  • Smart SEO analysis, SEO report and SEO audit

II. What does Magento 2 SEO extension function for?

There are some default functions included in this Magento 2 SEO extension but a lot of advanced features are added to make them better and better. 

  • XML Sitemap: you can exclude category, product type or product ID, and CMS pages from Magento 2 XML sitemap by configuring in the module config or on the edit page. This Magento 2 SEO module also lets you add meta data for the XML sitemap, divide sitemap and provides a user-friendly interface of the sitemap. 

xml-sitemap-general-magento-2-seo-extension

  • HTML Sitemap: you can create an HTML sitemap including products, categories, CMS pages, and additional links easily. If you want to exclude specific links from the sitemap, you can exclude it in the Magento 2 SEO module config. You can create HTML sitemaps for each store view, customize a URL key and display the sitemap in the footer or header. 

magento 2 seo extension - html sitemap

  • Canonical Tag: allows you to set up canonical tags for product, category pages and homepage easily by using Magento 2 SEO plugin.
  • Hreflang Tag: add Hreflang tag for each store view and enable for homepage, product, category, and CMS page. 
  • Meta Tag Template: creates meta tag template for products and category page with a lot of variables to insert. 

magento 2 seo module - meta tag template

  • ALT Tag Template: creates an Alt tag template and name template for images. 
  • Rich Snippets: sets up a number of snippets for products on SERPs in addition to 3 default snippets. You can also show rich snippets for category, display breadcrumbs in SERPs, and include a site search box in SERPs with the Magento 2 SEO module. 

magento 2 seo tool - rich snippets

  • Advanced Breadcrumbs: supports 2 types of Breadcrumbs: Use Short URL Path and Use Long URL Path to show on the website and determine breadcrumbs by category ID conveniently. 
  • 301 Redirects: optimizes user experience when they access deleted product pages. 
  • External Links: sets external links as No-follow links. 
  • Smart SEO Analysis: let you quickly check the current situation of each element in terms of SEO. Whether they meet SEO requirements or not? 

seo tool bar - magento 2 seo extension

  • SEO Report: shows a bar to let you know the process of entering meta title and meta description text length. 
  • SEO Audit: show notification of the SEO compliance (meta data, main keyword, description & outbound links).

magento 2 seo extension - seo audit

D. Conclusion 

SEO in Magento 2 requires lots of settings as well as SEO knowledge. It takes time to gain a significant rise in the ranking, but the equal gain in sales makes it worth the effort. This Magento 2 SEO guide helps store owners to know a lot of SEO functions to set up for stores, but they are still not enough.

Hence, it is recommended that you should find a third-party like Magento 2 SEO extension to make your site completely SEO-friendly.