How to create XML&HTML Sitemap in Magento 2?
Blog
May 3, 2023 • by Victoria

How To Generate XML & HTML Sitemaps in Magento 2

E-commerce development
image

Magento 2 is an e-commerce platform that offers a wide range of features to help businesses create and manage their online stores. One of the key features of Magento 2 is the ability to create custom landing pages, which can be used to promote specific products, services, or campaigns.

 

Search engine optimization (SEO) is an essential aspect of any e-commerce website, and having a sitemap is a crucial component of SEO. A sitemap is a file that lists all the pages of a website to help search engines crawl and index the content efficiently.

 

In this article, we will discuss how to generate both XML and HTML sitemaps in Magento 2. We will provide step-by-step instructions on how to configure the sitemap settings and generate the sitemaps using Magento 2’s built-in functionality. We will also discuss an extension that can be used to generate an HTML sitemap in Magento 2.

 

 

How To Create Sitemaps in Magento: What Is Magento? 

 

Magento, now known as Adobe Commerce, is a widely recognized e-commerce platform that has gained popularity among online businesses. The software was first introduced as Magento 1; after a decade, the updated version of Magento 2 was released to address the limitations of its predecessor.

 

In 2020, Adobe ceased support for Magento 1, discontinuing updates and fixes. The first version of Magento was initially developed to provide a flexible e-commerce solution, but it lacked some critical features and was known for its sluggish speed. To address these issues and create additional benefits, the development of Magento 2 focused on enhancing the platform’s capabilities.

 

Magento 2 is a PHP-based content management system that offers numerous features, benefits, and characteristics. It provides flexibility in setting various product properties and allows for the management of a trading network of online stores with different domains, languages, and product ranges. The platform offers the ability to work with tax rates at the regional, country, or postal code level, depending on the type of sale and product. It also provides reports on sales, shopping carts, marked goods, reviews, tags, and search, as well as support for various payment and delivery methods, including delivery to multiple addresses.

 

Overall, Magento 2 offers a robust and feature-rich e-commerce solution that allows businesses the ability to create an online store and efficiently manage it.

Magento 2 Sitemap: What Are Sitemaps and Why Are They Essential for Your Business?

 

A Magento 2 sitemap is a file that lists all the pages on a Magento 2 website and provides information about each page to search engines. The sitemap helps engines crawl and index the website’s content efficiently, which can improve the website’s rankings.

 

There are two types of sitemaps that can be generated in Magento 2: XML sitemaps and HTML sitemaps. An XML sitemap is a machine-readable file that lists all the pages on a website in a specific format that search engines can easily understand. XML sitemaps include information such as the last modified date, the priority of the page, and how frequently the page is updated.

 

An HTML sitemap, on the other hand, is a human-readable web page that contains links to all the pages on a website. The HTML sitemap is beneficial for website visitors, as it provides an overview of the website’s structure and helps them navigate the website more easily.

 

XML Sitemap Benefits HTML Sitemap Benefits
Helps search engines crawl and index all pages of the website, including additional metadata and less visible pages that may not be easily discoverable. Helps users easily navigate and find the content they are looking for on the website, improving user experience.
Provides information about the structure and hierarchy of the website, allowing search engines to understand the relationships between pages. Provides an overview of the website’s structure and hierarchy, making it easier for users to understand the relationships between pages.
A new XML sitemap allows website owners to set priorities and indicate the desired frequency for specific pages; i.e., which pages are more important and how often they should be crawled. Can help with internal linking, as it allows Magento store owners to link to important pages directly from the HTML sitemap.
Helps improve search engine rankings and visibility, leading to increased organic traffic to the website. Provide additional SEO benefits, as it can include keyword-rich anchor text and improve the crawlability of the website for search engines.

 

 

Generating a sitemap in Magento 2 is a straightforward process, and it can be done using Magento 2’s built-in functionality. Sitemaps can be configured to include or exclude specific pages, and the settings can be customized according to the website’s needs. Overall, generating both XML and HTML sitemaps are essential steps of the SEO process, and can help improve the website’s visibility and user experience.

Magento 2 provides built-in functionality for generating an XML sitemap, which can be customized to meet the specific needs of the website. Additionally, users can use extensions like the Mageplaza HTML Sitemap Generator to create an HTML sitemap, which can further improve the website’s navigation and user experience.

Manually Generate Magento Sitemaps: Step-by-Step Guides

 

HTML and XML sitemap generation in Magento 2 can be done by following these steps:

 

  1. Login to your Magento 2 Admin Panel.
  2. Go to Stores > Configuration.
  3. In the left sidebar, click on Catalog > XML Sitemap.
  4. In the XML Sitemap settings, set “Enabled” to “Yes.”
  5. Configure the settings for the XML sitemap according to your needs, such as “Frequency,” “Priority,” and “Include in Sitemap.”
  6. Click on the “Save Config” button to save the changes.
  7. To generate the XML sitemap, click on Marketing > SEO & Search > Site Map.
  8. In the “Sitemap” section, click on the “Add Sitemap” button.
  9. Enter a “Filename” for the sitemap and click on the “Save” button.
  10. Click on the “Generate” button to generate the sitemap.

 

To generate the HTML sitemap, you can use a Magento 2 extension such as “HTML Sitemap Generator” by Mageplaza. Here are the steps to generate the new sitemap using this extension:

 

  1. Download and install the “HTML Sitemap Generator” extension from the Magento Marketplace.
  2. Login to your Magento 2 Admin Panel.
  3. Go to Stores > Configuration > Mageplaza > HTML Sitemap.
  4. Set “Enabled” to “Yes.”
  5. Configure the settings for the HTML sitemap, such as “Maximum Depth,” “Maximum Products,” and “Sort Products by.”
  6. Click on the “Save Config” button to save the changes.
  7. To generate the HTML sitemap, go to Content > Mageplaza HTML Sitemap.
  8. Click on the “Generate” button to generate the sitemap.

Generate Sitemaps in Magento 2: Conclusion

 

Having both an XML and an HTML sitemap is essential for any Magento 2 website, as it helps search engines crawl and index the site’s pages more efficiently. By following the steps outlined in this article, users can easily generate both XML and HTML sitemaps using Magento 2’s built-in functionality or the Mageplaza HTML Sitemap extension.

 

Generating a sitemap is a crucial aspect of SEO, as it allows search engines to understand the website’s structure and content, which can lead to better rankings in search engine results pages (SERPs). Even if extensive, a well-organized and easily navigable website will improve the user experience for visitors and likely increase conversions and sales.

 

In summary, by following the steps mentioned in this article, users can create and maintain sitemaps for their Magento 2 website, which can help improve their website’s visibility and, ultimately, the success of their online business.

Written by

image

Victoria

Industry Expert

FAVORITES OF THE MONTH

Don't miss our updates