A sitemap is an important SEO factor. Search engines need it to better understand your website content and intelligently crawl and index it. A sitemap is simply a file containing a list of pages that you want Google and other search engines to index. Although it’s up to the search engine to decide whether or not to index all the pages of a website, a sitemap serves as a guide to your website’s pages for the search engines.
Google recommends sitemap for large websites and websites with rich media content. Since online stores are often large with a lot of rich media content, it’s important for them to have an XML sitemap. The XML sitemap is written for search engines. It also tackles content duplication issues.
In this article, we will see how to generate a Google SEO Optimized XML sitemap for Magento 2. So let’s get started.
To create and configure an XML sitemap for your Magento 2, log in to your website’s admin and navigate to Stores -> Configuration.
On the following page, select Catalog -> XML Sitemap.
For a Google-optimized sitemap, it’s important to configure all the options properly. First, let’s see what these options are and how to configure them one by one.
Ideally, the sitemap should be indexed as soon as you update your content. The configuration lets you set the frequency and priority for each type of content.
Uncheck the Use System Value checkbox to be able to customize the options.
In the Frequency dropdown, set the option according to the frequency with which you update your inventory/catalog. For example, if you upload products daily, you should set it to Daily. Setting it to Daily or Weekly is recommended. In the Priority field, enter a value between 0.0 and 1.0. Zero has the lowest priority.
Under Product Options, set the Frequency & Priority of the products as needed. You can also determine the extent to which product images are added into the site by setting ‘Add Images to Sitemap’ to either None, Base only or All.
Similarly, expand the CMS Pages Options and set the Frequency & Priority of the CMS Pages according to your preferences.
Expand the generation settings and do the following.
In the Maximum No of URLs per File field, enter the maximum number of URLs that can be included in the sitemap. By default, the limit is 50,000.
In the Maximum File Size field, enter the largest size in bytes that is allocated for the sitemap. The default size is 10,485,760 bytes.
If you are using a robots.txt file to instruct search engines how to crawl your site, set Enable Submission to Robots.txt to Yes.
When you are done with all these settings. Click Save Config.
The default Magento 2 sitemap settings are somewhat limited as it does not allow you to generate an HTML site map and more than one XML sitemaps. Also, you can’t include/exclude links in the sitemap, etc. All these limitations are covered by the FMEextensions XML & HTML Sitemap Extension for Magento 2. Let’s see what the features of the extension are and how it helps you in generating a more optimized Magento 2 sitemap.
The extension allows creating multiple XML sitemaps to get thousands of URLs indexed. It also offers more features such as including images titles and include additional links etc.
The extension lets you include or exclude links to the Magento 2 XML sitemap to show only the relevant content to search engines.
The extension offers a bonus feature to create an HTML sitemap to improve the user experience of the store.
You can configure the following settings for the HTML sitemap.