Shopify $1 For 3 Months: The Limited-Time Offer Is Back!
The Shopify 1 dollar 3-month deal is officially back from Oct 31, 2024. Now, all new merchants can enjoy 3 months of Shopify for $1/month. See how to claim the deal now!
Vinh Jacker | 10-01-2024
The Most Popular Extension Builder for Magento 2
With a big catalog of 224+ extensions for your online store
There are billions of websites competing for visibility in the search engines. You should leverage different tools to improve your SEO performance. Sitemaps are one of the essential elements which may help you achieve this goal.
In today’s article, we would like to guide you to generate both Magento 2 XML and HTML sitemaps.
In general, a sitemap is basically a navigational tool that contains links to all located resources on a website. It provides an overview of the site’s structure and content.
For Magento 2 sites, XML and HTML are the two most popular and critical sitemaps.
Main purpose of using XML sitemap: Help search engines understand the site’s structure and index the pages better.
An XML (Extensible Markup Language) sitemap is a plain-text file that contains a list of all your Magento 2 site’s URLs, along with additional metadata for each URL. This sitemap is submitted to search engines such as Google and guides their crawlers, informing them about the available pages on your website and how to access them.
Pay attention to these limits
If your XML sitemap has more than 50,000 URLs and its file size exceeds 50MB, creating many sitemaps would be recommended.
Benefits of XML sitemap
Main purpose of using HTML sitemap: Support users to explore the site and find their desired items more effectively.
An HTML sitemap is a webpage that lists all the subpages of your website, typically found in the footer to make it easy for visitors to access. Unlike an XML sitemap, which is designed for search engines, an HTML sitemap is created for users. It provides a straightforward outline of your site’s navigation, helping visitors quickly find the resources they need.
HTML sitemaps are crucial for any website, particularly e-commerce sites, as they enable shoppers to locate desired items more efficiently. However, for extensive websites with many categories and products, an overloaded HTML sitemap can become confusing. In such cases, you might consider limiting the sitemap to essential pages, like main categories, or organizing it into multiple hierarchy levels.
Ideal HTML sitemap should:
Benefits of HTML sitemap
Hire Magento Developers
What you need to do is only describing desired features of the Magento website, we will help you to build the store that ticks all the boxes!
Get StartedIn fact, you can generate a sitemap manually if your website is small enough. However, in case your Magento eCommerce site has many categories and products, it is impossible to create a sitemap manually.
Fortunately, Magento 2 provides a built-in feature so you can generate and configure a sitemap in the backend.
To generate a new XML sitemap in Magento 2, follow these steps:
From the Admin Panel, go to Marketing > Seo & Search > Site Map > click on the Add Sitemap button
In the Filename field: Set the name of the XML file In the Path field: Enter the Path where it will be located Choose Store View Press Save and Generate button
Once you have finished, you can see the list of sitemaps in the grid.
You can find the generated sitemap URLs in the Link for Google column.
The last time a sitemap is generated is displayed in the Last Generated column.
You can also create separate sitemaps for different store views. The store view of the sitemap is shown in the Store View column.
You can click on the Generate button to update/generate a sitemap instantly.
A standard Magento 2 XML Sitemap contains links for products, categories, static pages, and product images.
Magento 2 allows you to have XML Sitemap generated automatically by Cron.
From the Admin Panel, please go to Stores > Configuration > Catalog > XML Sitemap
The first three tabs, including Categories Options, Products Options, and CMS Pages Options have the same structure. Under each tab, you need to set the Frequency and Priority for each page type.
Frequency setting shows mostly how often the page is likely to change.
Priority setting aims to signify the importance level of each page.
The Products Options tab has the option to Add Images into the sitemap. You can choose “None” to not add an image to the sitemap, “Base Only” to add only the main photos, “All” to assign all photos. It is recommended to add base images because of the sitemap size limitations.
Under the Generation Setting tab, you will set up and configure the schedule of the sitemap auto-generation here. This feature only works properly if your CRON is working correctly.
Enable: Choose Yes to enable the sitemap auto-generation.
Start Time: The server time when a sitemap is generated. You should set it at night when the load is minimal.
Frequency: How often a sitemap is updated. You can set it daily if your product adding or changing on your site occurs daily.
Error Email Recipient: The email address that receives error notifications if the auto-generation fails.
Error Email Sender: The email address that sends the sitemap generation error notification.
Error Email Template: The message used in the error notification email, you can leave it as default values.
To set the email addresses for these fields, go to Stores > Configuration > General > Store Email Addresses
Under the Sitemap File Limits section, define the sitemap limitations.
Different search engines may have different rules and limitations. Google XML sitemap should not contain more than 50,000 URLs and be larger than 50MB (52,428,800 bytes) These rules are also applied in Magento 2.
In the Search Engine Submission Settings, you will configure how an XML sitemap is submitted to the search engine crawlers.
You can choose “Yes” to Enable Submission to Robots.txt. The sitemap link will be added to robots.txt. Crawlers read this file for getting the site indexation rules.
Related post: How to configure Magento 2 Sitemap
At present, Magento 2 does not support generating HTML sitemaps. Also, the XML sitemap generation also has some limitations. For example, store owners cannot include or exclude a specific object. This can affect the understanding of Google bots on your site.
To create HTML sitemaps as well as optimize XML sitemaps, you should take advantage of Magento 2 XML, HTML sitemap extension by Mageplaza.
XML and HTML sitemaps are well included in Magento 2 SEO All-in-one package.
This HTML sitemap configuration consists of Categories Sitemap, Pages Sitemap, and Products Sitemap. You can have all of them added in the footer of your page.
Enable HTML Sitemap: choose “Yes” to enable HTML Sitemap. A New HTML sitemap configuration will be expanded automatically.
Enable Categories Sitemap: choose “Yes” to display all category pages.
Enable Pages Sitemap: choose “Yes” to display all pages in the website.
Enable Products Sitemap: choose “Yes” to display all product pages.
Enable Additional Links: if you have a ton of links that can’t be automatically inserted into an HTML file, choose “Yes” to enable this permission.
Additional Links: Paste additional links you want to add.
Add Sitemap Link to Footer: choose “Yes” to enable the advanced HTML Sitemap in the footer of pages.
After finishing these configurations, you will see an advanced HTML sitemap is added to the footer of the page.
When visitors click on the sitemap, they will have an overview of your website. Therefore, they can easily find their desired products.
The XML Sitemap’s settings are shown right under the HTML Sitemap’s configuration.
Homepage Optimization: Choose “Yes” to apply, which means that the link of the CMS page using the homepage will be removed in the sitemap file.
Enable Additional Links: For SEO purposes, you may want the crawlers to index the links from another site that have a strong connection to your site. This advanced feature allows you to achieve your goals in a second.
XML and HTML sitemaps are handy tools that any Magento 2 store should have. While an XML sitemap can boost SEO performance, an HTML sitemap can enhance user experience.
We hope that, by this article, you have got a better foundation of sitemaps in Magento 2. And you are ready to add these features into your Magento 2 site.