Ashok Sharma

Top 12 Killer SEO Tips for your Magento 2 E-Commerce website

Magento is the most popular and fast-growing, open-source e-commerce platform on the planet, and there is no doubt that Magento is a necessity in today’s e-commerce marketplace due to its innovative and extensive customized features. Whether you are working professional and entrepreneur looking to build your e-commerce site or a large multi-channel retailer looking to enhance your online presence and increase your conversions, Magento is your premier e-commerce platform for growth.

Why Use Magento?

  • Magento Open Source e-commerce is fully equipped with a variety of features.
  • Magento gives merchants full control and flexibility over the design, the content and the functionality of their online shops.
  • Magento is Open Source e-commerce platform and is free to download.
  • Best eCommerce Platform for Online Selling
  • If you need assistance with Magento Open Source Magento Forums is available for sharing tips, tricks and support.
  • Like WordPress, Magento is one of the most search engine friendly e-commerce platforms.
  • Magento platform offers Mobile friendly configuration.
  • Magento e-commerce Platform is packed with various extensions that can be easily incorporated to fulfill business requirements according to the needs.
  • Magento is independently supported by thousands of developers and merchants worldwide

SEO Tips for the Magento E-commerce Platform

One of the concerns of many Magento users is SEO. Although Magento is already very SEO friendly when installed, there are many things that can still be improved upon. The top technical Magento issue that needs to be fixed immediately for improving the SEO listed below:

  • Duplicate content problem for many pages
  • Not-optimized HTML sitemap
  • Setup an XML sitemap in Magento 2
  • Optimize product images
  • Speed up your Magento 2 E-commerce site
  • Modify Robots.txt File
  • Issue with Magento 2 default Title and Description
  • How to add Meta Title and Meta Description for a Product/ Category and Content Pages in Magento 2
  • Enabling Search-friendly URLs in Magento 2
  • Remove default store code from URL
  • Add a Blog page to your Magento store
  • Get quality links to your store via different platforms

1. Duplicate Content Problem for Many Pages

Duplicate content is one of most common SEO issue affecting the thousands of Magento store-owners. To get rid of duplicate content we can use canonical tag Go to the Stores >> Configuration >> Catalog >> Catalog >> on right side scroll down to Search Engine Optimization and set Canonical LINK Meta Tags for Categories and Products to Yes.

In Magento duplicate content, occurs because of the followings:

  • Product filtering
  • Product sorting
  • Pagination
  • Same product in different categories
  • Variation of the same product

Head over to a nicely written post for explaining the above 5 points - Common Duplicate Content Issues in Magento.

2. Not-optimized HTML Sitemap

Magento 2 does not support the auto-creation of HTML Sitemap by default. We need to implement some of the extensions which can solve the HTML sitemap issue in Magento 2. I personally used this extension Dynamic HTML Sitemap for Magento 2

Key Features of using HTML Sitemap for Magento 2:

  • It auto-generates an HTML sitemap for users and search engines and includes links to categories, products, CMS pages and store views of your Magento 2.
  • You can customize the listing order by comas.
  • Easily add external links in your sitemap file.
  • Your sitemap will be automatically updated when there are any changes in your store.

3. Setup an XML Sitemap in Magento 2

A XML sitemap is a file that contains all the pages of the website. Magento 2 equipped with better XML sitemap functionality. To enable the XML sitemap log in to your admin and Navigate to Stores >> Settings >> Configuration >> Catalog >> XML Sitemap.

In the drop-down menu fine-tune the settings for Category Options, Product Options and CMS Pages Options according to your necessities. And now open the Generation Settings select the following:

Enabled: Yes

Start Time: Insert time after 00:00 (Don’t choose exactly 00:00)

Frequency: Choose Daily

Error Email Recipient: You can leave this blank

Error Email Sender: You can leave this at ‘Use System Value’

Error Email Template: You can leave this at ‘Use System Value’

Finally, on Search Engine Submission Settings set Enable Submission to Robots.txt to Yes and save changes.

4. Optimize Product Images

Never forget to optimize product images for better search engine rankings. Make sure that all the images have proper alt-tags that describe the images because search engines can’t read images and we need to add proper alt text.

In addition, the important points to consider while creating alt-tags for images:

  • Always use a proper description and never try to stuff your keywords in alt-tag.
  • Give your images informative filenames. For example, my-new-black-kitten.jpg is a lot more informative than IMG00023.JPG
  • Alt-tags need to be short, clear and to the point.

To optimize the product Images In Magento 2, Login to admin >> Products >> Catalog >> in Configurable Products Double click on thumbnail >> Go to the detail page >> scroll down to Images and Videos >> Double click on images >> add alt text in the given field.

5. Speed Up Your Magento 2 E-commerce Site

Fast page loading speed can influence search engine rankings and this is one of the top Organic Search Ranking Factors. If your website loads quickly, the user will love to access it and search engines can reward you for it. There are several ways to increase the page speed of your site, the following tips can help you to speed up your site.

  • Enable all caching features (System >> Cache Management) and Flush Magento cache
  • Enable Flat Categories and Products (Stores >> Catalog >> Catalog >> Scroll down to Use Flat Catalog Category and Use Flat Catalog Product >> Set Yes >> Save Config)
  • Merge your JavaScript and CSS files, This will reduce the load time and increase the page speed. Stores >> Configuration >> Advanced >> Developer >> on the right side.
    JavaScript Settings:
    Merge JavaScript Files: Yes
    Enable JavaScript Bundling: Yes
    Minify JavaScript Files: Yes
    CSS Settings:
    Merge CSS Files: Yes
    Minify CSS Files: Yes

6. Modify Robots.txt File

The Robots.txt file instructs search engine robots which pages on the site to crawl or which pages not to crawl. To find your robots.txt file, All you have to do is enter the site URL into your browser and then add /robots.txt onto the end.

To modify your Robots.txt in Magento 2 just go to the Stores >> General >> Design >> Edit custom instruction of robots.txt File - if needed.

7. Issues with Magento 2 Default Title and Description

When we set up a Magento store, it will pick the default Title and Meta Description and we need to edit these to optimize for SEO. So first Navigate to Magento 2 admin >> Content >> Design >> Configuration

Then on Default Store View click on “edit

Scroll down to HTML Head section and here you can edit these default values

Please note: Please make sure to add proper Title and Description.

For Title tag use 50–60 characters
For Description tag use only 150-160 characters

You can leave the default keywords blank as Google no longer use the keywords tags in web rankings.


8. How to Add Meta Title & Meta Description for a Product/Category and Content Pages in Magento 2

Add Meta Title and Meta Description for a Product: Navigate to Magento 2 admin >> Products >> Catalog >> Click on Edit product and scroll down to Search Engine Optimization, There you can fill Meta title and Meta Description.

Add Meta Title and Meta Description for a Category

Navigate to Magento 2 admin >> Products >> Categories >> choose a category and scroll down to Search Engine Optimization.

Add Meta Title and Meta Description for Content Pages

Navigate to Magento 2 admin >> Content >> Pages >> Pick a page and Select Edit and scroll down to Search Engine Optimization.

9. Enabling Search-friendly URLs in Magento 2:

Every URL need to be unique, static, and perfectly optimized according to SEO guidelines.

We should have the following URL structure for category and product pages:

For Category page:

For Sub-category page:

For Product page:

Adding stop words (and, or, but, of, the, a, etc.) isn’t necessary

Stop using unsafe characters (blank/empty space and " < > # % { } | \ ^ ~ `)

Enable SEO-Friendly URLs in Magento 2 follow the following steps:

  • First log into your admin area and go to Stores >> Configuration >> General >> Web.
  • On this Page Click on Search Engine Optimization tab and select Use Web Server Rewrites to Yes. This option will also remove “index.php” from your URLs.

  • Finally, click on the Save Config button

You can also Set the Global Search Engine Optimization configuration: Go to the Stores >> Configuration >> Catalog >> Search Engine Optimization and change the following fields for SEO friendly.

Popular Search Terms: Enable

Product URL Suffix : .html

Category URL Suffix : .html

Use Categories Path for Product URLs: Yes

Create Permanent Redirect for URLs if URL Key Changed: Yes

Page Title Separator: -

Use Canonical Link Meta Tag For Categories: Yes

Use Canonical Link Meta Tag For Products: Yes

Important point to check:

If your Magento is installed in the root of your domain (, you need not perform any changes in the .htacess file. But, if your Magento is located under a subdirectory ( you need to edit your .htaccess file by changing the following line:

#RewriteBase /magento/
RewriteBase /your-magento2-folder-here/

10. Remove Default Store Code From URL

To remove the default store code from URLs:

Go to admin >> stores >> configuration >> General >> Web >> URL option >> Add Store Code to URLs >> No,

When done with the above steps, click on Cache Management link to flush the cache.

11. Add a Blog Page to Your Magento 2 Store

No one can deny the power of the blog page, so it is very important to learn how to add a new Blog page in your Magento 2. We can use a FREE blog extension for the Magento 2 e-commerce store without adding a third-party framework such as WordPress. So if you want a Magento 2 blog extension that comes with responsive design, is100% FREE, is open source code, and builds your SEO friendly blog then you can check this extension here.

12. Get Quality Links to Your Store

Quality links are simply the process of creating relevant inbound links to a website, which will help the website to achieve higher rankings within the major search engines and it will also generate targeted traffic to your website. If you would like to build high-quality links then you will have to pick the best strategies for your store and you can follow the nicely written post on How to Get High-Quality Backlinks here.


In this article, I have covered 12 different SEO Tips for your Magento 2 e-commerce website to gain higher rankings. Take some time to review and implement these steps to improve your e-commerce rankings step by step.

Very Comprehensive Guide.

Thanks, Ashok for sharing this post.

In addition, can you also add custom instructions like disallowing directories or any URLs like shown here:

Seen the mentioned guide for configuring Magento Robots.txt during my research and shares here to make your tutorial more awesome :)
Thanks for sharing this awesome guide, many people don't know about XML file and updating meta tags through it, Here's the best guide about using XML file in Magento (, Customizing module with Magento layout XML file is very easy, you can add custom titles, meta tags, keywords or a description of your Magento module page. You can easily add this custom information to all existing, core or newly created modules.
wonderful post. Thank you so much for taking your time to sharing this.
Great article ! Any idea how to get backlinks for my site . I went through skyscraper, which is great idea, however, I have no clue how it can applied to retail business. Again wonderful tips !
Hello Ashok!

That is one great write up and a nice collection of valuable SEO tips for Magento.
It covers nicely all the typical and relevant parts that matter when it comes to SEO - all the usual suspects are addressed in your list.

One nice addition might be masking of Filter URLs by using PRG Pattern.
This is a highly effective measure when it comes to avoiding (Near-) Duplicate Content related to Filter Navigation.
Furthermore it helps saving valuable Crawl Budget, improves Internal Link Structure and optimizes indexing by Google.

You can read more about how it works on here:
and about why its the better option compared to other often recommended SEO techniques for tackling issues with Filter Navigation
on here

Best of all, its easy to apply and use for any Magento 2 store using this Extension:
Huge SEO improvement with minimum Effort!

Thanks again for your valuable article on Magento SEO!

Cheers & have a good one!
Lot of important information are collected from this content. Thanks for sharing this content!
Sanjay Mishra
Thanks Sanjay ! I’m glad to hear that you liked the content 🙂
Thank Ashok Sharma.I'm Daniel from India. I want to build my store with Magento 2, but I know how to choose good magento agency. Can you advise me how to evaluate them. I also found a list of results on google here: [link removed by moderator]
Daniel Anthony
HI Daniel,
Thank you for getting in touch.
We also have in-house development team that has done considerable work in Magento 2.
Please share your project details ( and i will connect you with the right person to discuss further.
Best Regards
Ashok Sharma
Hi Ashok, want to brand management of my site [link removed by moderator] can you please check and provide me your suggestion.
Mayur S
Hi Mayur, You can connect with me on Twitter.
"Magento is the most popular and fast-growing..." source for this?

I would have thought Wordpress has a bigger share of the market, as well as Shopify, although that's paid.
I think this will clear you everything about magento:
In my personal experience Magento is more secure than WordPress, rest depends on your needs. :)
Very useful SEO Tips - Great post Ashok ;-) Is Magento Wordpress based?
Glad you liked the post. Magento, just like WordPress, is based on an open source technology. Magento is more secure than WordPress and offers a high-level of customization and functionality.
Ashok Sharma
So you could run a Wordpress type site on it? Is it supported with add-ons and plugins that you can add?
Magento is the more efficient and recommended alternative to WordPress when it comes to selling products online. For Magento you need to separately install it and there are different plugins available.
Ashok Sharma
Thanks for the heads up
Amazing article my bro. Those tips gonna help me improving my general blog as well. I will surely give them a try. Thanks a lot for such informative article.
Md. Naziur Rahman
Thanks for reading the post Rahman, and I really appreciate your comments.
Excellent tips, Ashok!
Akash Srivastava
Akash, glad you liked the post :)
Add a comment