How to do On-page SEO for Magento 2?



The Most Popular Extension Builder for Magento 2

With a big catalog of 234+ extensions for your online store

mageplaza extensions M2

On site SEO is the process of optimizing factors on a website to both search engines and users. From that, your website can be ranked higher and earn more traffic by search engines. In essence, on-site SEO is what you have to do so that search engines be able to understand the content and structure of your website. The more information search engines crawl your site, the more chances your website can be indexed and ranked higher. Billions of the unexpected things can occur on your website if you don’t check the elements on site regularly.

Some important factors

On-site SEO is not difficult for you to get right. So, if you want your site rank well in search engines, you have to perform and optimize the factors well. Let’s discover some crucial ones in On-site SEO:



The domain is the whole face of the website, besides the style you want to display, the domain also helps in the effective SEO process and has a great influence on the ranking of all websites on the website. From this reasons, you should choose the domain following one of the choices:

  • The domain contains the keywords: Through keywords, users can search for information about it by using the website on the search engines. Plus, the keywords will help you to clearly define your goal when you start to build the content.
  • The domain is named after brand: Putting the domain follow the brand is useful for you in the process of SEO. From this point, it can help the customers identify the product or the company easily. For example,
  • The domain has high PageRank: when your site has high Pagerank, this means your site is known and has more traffic. So doing SEO become very simple and it does not take much time and energy for you.
  • The domain is short and memorable: Few people can remember a long, unspecified domain, hard to read and hard to remember. So, store owners should think of short, easy-to-remember and special domain names that can “pin” into the memory of the customer. This will also help you save maximum marketing budgets because customers will remember you right away whenever they have a need
  • The domain follows geography: You should choose the domain name according to the site needs SEO. This will help your website to clearly target the segment/customer segment by location.


Hosting is the place to store the content of the website. In other words, hosting is like a library, and accessibility is the process that you take the books, return the books and sign up for cards, etc. Every website has a host, so when you visit that site, the fact that you are visiting the site’s host. You should choose quality hosting services (strong server, broadband).


The hreflang is a metadata tag declared at the top of the website that helps search engines extract data in the exact language that the website is writing, and, thanks to this language declaration, Google can appreciate higher in the languages the website supports. The Hreflang tag is used to declare the region and language supported so that search engines can distribute their search results in the exact language you want, which meaning that the rank of the keyword can be higher on the area you had specified.

File Robots.txt

File robots.txt is a form of text that contains the code that webmasters create, which has the effect of navigating the search engine bots to your website. In other words, through this file, it gives webmasters more flexibility in “allowing” or “forbidden” the bots of search engines to index any area on your website.



A sitemap is a miniature map of the website and it contains all URL links in your site. After you submit the Sitemap to Google it will help the search engine crawl the site effectively and constantly update the site changes such as writing new articles or editing the web. Our website needs to have a sitemap to map the instructions for the Google bot to the address that updates your site data to the search system. Generally, Google appreciates the website with site navigation schemes and the search rankings will depend on the content of the site. There are two types of sitemap:


  • HTML sitemaps are used mainly for the reader to know the schema of the website and they can easily search for more information.
  • The second type is the XML Sitemap created specifically for search engines. It tells the search engines the structure of the site, how often the page content is updated, and which pages take precedence in the search results.

404 Page

404 Page is used to inform the user that a certain content (URL) on the website does not exist.


Some best ways to optimize 404 page:

  • Create a 404 page to report URLs that no longer exist.
  • Use the redirect: Use the redirect to navigate the 404 pages to the other page, usually the home page.
  • Do not let Google index this page.



Redirect is the process of forwarding from this URL to another. You should use redirect to redirect and maintain the values in SEO.


Some commonly used types of the redirect:

  • 301 Moved Permanently: 301 Moved Permanently is a permanent navigation of 90-99% link juice to the navigation page. In most cases, 301 redirects are the best method to perform redirections on a web page.
  • 302 Found / Moved Temporarily: It is temporarily redirecting 0% link juice and in many cases, we should not use.
  • Meta Refresh: Meta Refresh is a kind of redirect that is executed on the page level, not the server level.


The canonical tag is an attribute in HTML code, which allows webmasters to prevent duplicate content by defining canonical or preferred tags. If the content of your website has the same article, Google will evaluate the low quality of content and thus, your website will be reduced the ranking. Therefore, you must have a canonical tag to reduce the duplication of content on the page. Well, Canonical tags will help Google know the article on your website is not duplicated and it should be found on the search results page.



Now it is high time for you to check all of the factors on-site on your website. Make sure the on-site SEO work that you do is right. I believe that you always expect your website to be improved the rankings by the search engines.

SEO extension from Mageplaza is a perfect choice for you. It includes all factors On-site SEO that help your site have more chances to be ranked higher. Besides that, it also includes many wonderful features for you to do your better SEO.

Increase sales,
not your workload

Simple, powerful tools to grow your business. Easy to use, quick to master and all at an affordable price.

Get Started
avada marketing automation

New Posts

December 2021
December 30, 2021

December 2021

November 2021
November 30, 2021

November 2021


Stay in the know

Get special offers on the latest news from Mageplaza.

Earn $10 in reward now!

Earn $10 in reward now!

go up