>Magento 2 SEO Settings – All Default SEO Features of Magento 2

Magento 2 SEO Settings – All Default SEO Features of Magento 2

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.

Till now, the default Magento 2 SEO settings support quite well the basic needs of on-page SEO. In this article, we will list out all the SEO features that you can configure from Magento 2 admin panel.

*Tip: If you want to know everything about Magento, let’s explore this useful article HERE.

I. SEO Meta Data in Magento 2

Metadata is the foremost fundamental settings when it comes to SEO. This information is shown on the search result page and effects how the search engine crawlers index your site. While setting up your store, you should consider filling a 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 configure. You also use Magento 2 Meta Tags Template extension to auto-add meta description, meta title, meta keywords and description for products and categories. 

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.


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. However, in the latest update of Google in 2017, the meta description is now up to 300 characters of length. A 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 Magento 2 SEO settings 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.


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:

    • 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 which are imported, migrated or programmatically created.

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.

5. Meta Data for Categories, CMS Pages and Homepage

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.

II. Magento 2 Canonical Tag Settings for Search Engine Optimization

Having an 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.

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 Eco-Friendly and Hoodies category. If you choose Yes in this option, there may be 2 URLs pointing to the same product they are:


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.


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 with 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.

III. Magento 2 SEO Settings for URLs

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 these following reasons. Firstly, this information offers no value to users nor search engines. Moreover, it needlessly increases the length of your URL.


To do so, 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 Optimization

The default Magento 2 already has the product and category URL named based on the product and category name. However, 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.


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

  • 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 URL is replaced.


  • Product URL rewrite and 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.


  • Category URL rewrite and 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.


*Note: This permanent redirect is not applied to CMS pages. If you want to change 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.

IV. Sitemap Settings for SEO in Magento 2

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 Configuration

By default, 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. For more details, check out our tutorial on how to set up XML Sitemap in Magento 2. After finishing the configuration, submit the sitemap to Google using this instruction.

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

*Note: There is no HTML sitemap in Magento 2. If you want to include it on your website, please explore this HTML Sitemap extension. Beside, if your store has a large number of products, you can use Magento 2 XML Sitemap for a better crawling from search bot. 

2. 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:


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 to not check back later for changes.

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

V. Other SEO Features

1. Rich Snippets  in Magento 2

As you know, Rich Snippets help your website standout 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. Read this article to get more understandings about Rich Snippets and how to overcome this limitation.

2. Pagination Optimization

In Magento 2, 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 URL points to its category.

3. 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.

VI. Conclusion

SEO in Magento 2 requires lots of settings as well as SEO knowledge. It takes time to gain a significant rise in ranking, but the equal gain in sales makes it worth the effort. For more about search engine optimization, you can read our 27 Magento 2 SEO Tips. In the future, if there are any new upgrade to Magento 2 SEO Settings, this article will be updated on time. Got a question? Let us know in the comment section!