HTML Sitemap¶
It is widely known that all websites fight for search engine exposure. Business owners require their websites to be crawled by search bots (such as Google or Bing) and shown in the results to attract new customers. Sitemaps are simply one of the many strategies used to achieve this objective.
A sitemap for Magento 2 is an XML file that includes all of the website's page links. Magento 2 websites include hundreds or thousands of pages, thus it is vital to use a Sitemap to aid the search engine in indexing the product pages, even those that would otherwise be disregarded. Adding photos to the sitemap is another element that is highly significant for improved Search results, since images may generate more traffic when indexed by search bots.
The first step is to construct the sitemaps. This may be found under MARKETING - SEO & Search - Site Map.
This section includes all sitemaps created by your Magento 2 website.
Add the updated sitemap. Click the Add Sitemap option to proceed.
As sitemaps for every Store View may be created independently, it may be necessary to distinguish between them. In order to name them in the Filename field. The file may be saved in any existing directory, allowing you to choose your own Path. Once the sitemap has been created, it may be either Saved or Saved and Generated instantly.
The produced template may then be seen in the grid. The sitemap URLs are shown in the Link for Google field. The time at which the sitemap was last produced is shown in the Last Generated section. You may set individual sitemaps for each shop view. In the Store Examine column, you may view the store view of the sitemap. After you have built the sitemap, you can create it by selecting the Generate button.
After these basic steps, you will need to configure the sitemaps.
To access the configuration page for your Sitemap, go to STORES - Configuration from the admin area.
This opens Magento's default configuration. To configure the XML, select the XML Sitemap under the CATALOG tab.
Categories Options, Product Options, and CMS Pages are the first three tabs. Options have the same structure as Frequency and Priority specifications.
The frequency option modifies the general information search bots get and may not correspond precisely with how often they actually crawl these sites. This parameter indicates how frequently the page is likely to be updated. Always indicates that the page's content will vary each time it is visited. This value is used for URLs that have been archived, such as old blog articles. Please note that this is only the suggested value and not the required one, and it is always up to the search engine to choose when these sites should be recrawled. We propose at least a monthly or weekly frequency for category and product page updates.
The Priority function sorts your online store's pages according to their relative relevance. Please remember that the priority is determined based on other URLs on your Magento 2 site. Adding a high priority would not affect the position of your sites in search engine results pages. Priority is a relative value, thus placing the top priority on every page would be ineffective. We propose experimenting between 0.4 and 0.7.
The Base Only option only adds the primary picture to the sitemap, whereas the All option assigns all photos. Depending on the number of items and the average amount of photographs per product, it may be fair to include just the basic images owing to sitemap size constraints.
The Generation Settings are one of the most crucial parameters for sitemap modifications.
Enabling this area enables you to specify sitemap auto generation and the scheduler. Please remember that it will only function properly if CRON is functioning properly. If the auto generation fails, Magento 2 enables email alerts to be set up. Input your email account in the section labeled Error Email Recipient.
Sender is configured under GENERAL - Store Email Addresses.
As per this official Magento 2 documentation, the Email Template may be modified.
The Sitemap File Limits tab controls Sitemap file size restrictions.
Different search engines publish varying rules and restrictions. According to Google's regulations, the maximum number of URLs per file should not exceed 50,000, and the maximum file size should not exceed 50MB (52 428 800 bytes).
The Search Engine Submission Settings permit the direct addition of the Sitemap to Robots.txt
If you activate this functionality to include sitemaps in the robots.txt file, each sitemap will be mentioned separately. This automated procedure may be useful in scenarios with many store views.
Following these fairly basic methods can significantly increase the exposure of your shop. Now, search engine bots can traverse your Magento 2 shop with ease and maybe rank it higher. In turn, this will draw more customers to your website.
The Magento 2 developers have performed a substantial amount of Search Engine Optimization work. In particular, sitemap creation is a robust and adaptable solution that may be utilized without the addition of third-party addons. It addresses the most crucial aspects and answers the most pressing issues that website owners face.