Magento 2 SEO: The Ultimate Guide [2022]

Why SEO is necessary

Search engine optimization is one of the critical aspects for any Magento store. While off the page SEO, i.e. citations and links, is necessary, one should not forget about on-page optimization. On-page optimization can be a blessing if you implement it correctly.

While developing Magento 2.x, certain flaws of Magento 1.x were considered and hence have been improved in Magento 2.x. To be precise, SEO settings have been greatly improved in Magento 2 which I will explain in detail below so you can be aware of all the settings for SEO that come out of the box in Magento 2.

So basically, I have divided the Search engine optimization of your Magento store into three basic aspects. Think of them as a little checklist for your SEO. You can categorize all SEO configurations into these three divisions and one by one you can check and optimize your store according to them.

Here, I’ve come up with almost every setting for Magento 2 SEO. Have a look at what I have covered under this blog.


  1. -Metatags are snippets of information about your page. Basically, it will tell the person who is searching what your page contains. It’s not the actual information written on your page but something that’s written in the code. So, it’s not visible to user on the page, but when searching, Google will look for this snippet to know what your page is about.Metatags have been highly underestimated. For a higher rank of your store and for a neat look on the SERPs you need Metatags. I’m starting with how you can add metatags for products and categories.
    1. – In Magento 2, they have added one new feature for meta tags: Fields Auto-Generation. Applied on a global level, it will help you create product meta data templates. This new setting can be found here: Stores –> Configuration –> Catalog –> Catalog –> Product Fields Auto-Generation
      For a store with many products, this will serve as a great tool which saves a lot of time for store owners. But it also comes with a few limitations:

      • Auto-generated fields are global configurations so you cannot change them for category wise products.
      • Only 3 place holders are available: {{name}}, {{description}} and {{sku}}
      • Since most product descriptions are longer than 25-240 characters, the {{description}} place holder might not be the best choice for your meta tag description field.
      • Auto-generated fields are global and not retrospective. So, if you want to change the details for the products or make some amendments, they will not be reflected on the existing products where the details were already added.

      All in all, the new Product Fields Auto-Generation feature is good but it has many limitations as of now.
      Apart from Products Fields Auto-Generation, you can also edit meta description and title from product page settings here: Catalog –> Products –> Select & Edit Product –> Search Engine Optimization.

      The settings from here will overwrite the global meta description added from Fields Auto-Generation. This method is effective but the hell of a time consuming if you have a lot of products, which is probably the case for most Magento stores.

    2. -Just as for Products, for categories as well you can set up the meta data locally at the category level.Location for Category level metadata setting: Catalog –> Categories –> Search Engine Optimization. Here you can add meta title, keywords and description as per your requirement.2_Meta-data-for-category
    3. -You can change the title tags for your content pages from Content –> Pages –> {{content page}} –> Search Engine Optimization3_Meta-data-for-content-pages
    1. – In Magento 2 a product URL will be generated automatically according to the product SKU you have specified. But if you need to change it for any reason, you can do it here: Catalog –> Products –> {{Product}} –> Search Engine Optimization –> URL Key. You can also fetch all product URLs in Magento 2 to see if check if they are SEO-friendly or not!
    2. – Similarly, for categories, if you need to change the URL key, go to Catalog –> Categories –> {{Category}} –> Search Engine Optimization –> URL Key.
  2. -It’s a good practice to add your company or organization name in your store’s pages. It will help associate your company name to your store.To add this in the title tags across all pages you can set it here: Content –> Configuration –> Website –> HTML Head –> Page Title Prefix & Suffix4_Prefix-Suffix
  3. -Just as for title tags, you can add prefix and suffix to your product and category pages as well. The location for this setting is: Stores –> Configuration –> Catalog –> Catalog –> Search Engine Optimization5_product-category-URL-SuffixAccording to the configuration options, it’s possible to keep different suffixes for product and category pages but for a general familiarity and uniformity of the site, it’s not advised.
  4. -One of the significant aspects of better site ranking is the site loading speed. Here’s when optimizing images in Magento 2 comes in the picture! Images take up a lot of space and so more images mean slower site loading time. Hence it is of utmost importance to manage your store images by optimizing them for better site performance.Magento 1.x didn’t provide image optimization and the bad news is neither does Magento 2.x. But in Magento 2.x you can add alt attribute for images which will help better optimize the product images.The settings can be done here: Catalog –> Products –> {{product}} –> Images and Videos –> Alt Text.Also, remember to change the Alt text for your store’s logo. By default, it is “Magento Commerce”, which is not helpful at all.Change it to something that is more in accordance with your store’s image. The settings can be done here: Stores –> Configuration –> General –> Design –> HTML Head –> HeaderMagento 2 SEO: The Ultimate Guide [2022] 1Apart from optimization using Magento 2 SEO Settings, it’s a best practise to use to compress images before uploading them. You can also remove unused product images in Magento 2 for improved performance.
  5. -This is one of the best features added to Magento 2 SEO settings. By default, the microdata is added to all the product pages. It’s a good start but still a long way to go. You don’t need additional settings as they are not required.To sum it up, it’s a good feature but it can be improved. For example, if you want to add a search tool, organization or breadcrumbs you will need to add it yourself or with the help of any extension. They will not be added automatically under rich snippets.
  6. -You can add Google Analytics very easily to your store from: Stores –> Configuration –> Sales –> Google API –> Google Analytics7_Google-analytics
    To enable Google Analytics on your store, you first need to have a Google Analytics account. You can use that account details in your store. You can find your tracking id under Admin –> Tracking Info in your Google Analytics Account. Which you can then use on the settings shown above.Another good point is the feature to create multiple pages for the content experiment. You can add a Google Analytics Experiment Code to any of your store product page from here: Product –> Advanced Settings –> Product View Optimization. Moreover, you can also use our Magento 2 Google Analytics 4 Using GTM extension to connect your store with the latest version of Google Analytics.8_Product-View-Optimization
  7. -In Magento 2, implementing Google AdWords has become very easy. You can find the configuration here: Stores –> Configuration –> Sales –> Google API –> Google AdWords9_Google-Adwords
    Details about all the fields mentioned above can be easily found in your Google AdWords account.
  8. -This is by far the simplest and most important factor while considering SEO for your store. Any e-commerce site or any website for that matter; needs to have unique content. Duplicate content may raise a lot of problems. It’s one of the reasons Google bans sites from search results.The good news for you is Magento 2 now provides settings for solving duplicate content issues and display unique content online.
    1. – The rel=canonical element, often called the “canonical link”, is an HTML element that helps webmasters prevent duplicate content issues. It does this by specifying the “canonical URL” is the “preferred” version of a web page. Using it well improves your site’s SEO.You can enable canonical tags for categories in Stores –> Configuration –> Catalog –> Search Engine Optimization
    2. – You can enable canonical tags for products under Stores –> Configuration –> Catalog –> Search Engine Optimization.
    3. – If you navigate to Stores –> Configuration –> Catalog –> Search Engine Optimization, you’ll see the option where you can choose whether to enable or disable showing category paths in product URLs. These category indicators are great for indexing and show the logic of better store navigation. You can use this setting in combination with canonical tags for better optimization.


    1. – In Magento 2, you can edit your robots.txt file from your admin panel itself which is very helpful and quick way for admins to manage robots.txt. This is one of the best things the developers did while adding SEO features in Magento 2. You can find the settings at: Content –> Configuration –> Search Engine Robots.11_robots-txt
      It’s quite neat and dandy. The most logical place for your site’s robots.txt file is at and that’s where you can access the file on your site.Though a default configuration of robots.txt is ok, you will need to disallow these directories:/catalogsearch/,/catalog/product_compare/,/wishlist/
    2. – As can be seen in the image above, by default, meta robots in Magento 2 are set to INDEX, FOLLOW which would be okay for Google to index your site. But, you can’t customize it on a specific page. E.g., if you create a duplicate product to set up an experiment in Google Analytics to test your site, you will have to find a way to stop search engines accessing this page. You could add such URLs to the robots.txt file but the result is not always as you would expect from it.
    3. – Many useful settings related to generating an XML sitemap can be found out-of-the-box in Magento 2 at: Stores –> Configuration –> Catalog –> XML Sitemap
      12_XML-sitemapThe most critical changes are as follows:

      1. All the images on your site are added to the sitemap automatically;
      2. You get an option to submit the URL of your XML sitemap to your robots.txt.
      3. You have the flexibility to set the number of pages per XML file as well as the maximum file size of your sitemap file.

      And now to point out some limitations:

      1. You cannot choose which product type should be added to the XML sitemap. For example, if you have a configurable product with two simple products. Each simple product will be automatically added to the XML site map but if you want to add the final configurable product version only, it is not possible as of now.
      2. Images are added automatically and that’s great but other file types .pdf, .doc, .xls etc. are not added automatically. You will need to add them manually.
      3. All pages are included automatically. If you need to include or exclude specific pages, it’s not possible.

To sum it all up…

I hope this article provided a general idea about all the SEO features that come with Magento 2 to all the inquiring minds. As you can see a lot of options are available and you can use the features to optimize your Magento 2 store as the settings and configurations are still very basic and very static. It’s still better than Magento 1.x and it will surely help you improve your site’s performance in SERPs.

If you have any questions or want to share any additional information feel free to drop me a line in the comments.

Make sure to share the post with fellow Magento 2 store owners via social media.

Thank you.

(based on 26 Reviews)
Magento 2 SEO: The Ultimate Guide [2022]

Shivbhadrasinh Gohil

Shivbhadrasinh Gohil is the Wizard of Light Bulb Moments at Meetanshi.
He is a Digital Marketer and started optimizing Magento stores since 2010. He has founded 2 successful Magento Agencies since 2014. When not working, you can find him reading books or spending time with his children.


Leave a Reply

Your email address will not be published.