How To Use XML Sitemap For Magento 2

woman in orange shirt using iphone

A sitemap is a file that contains a list of all the pages on a website, providing search engines with a path to find and index all the relevant content. XML sitemaps, in particular, are designed for search engines and provide specific instructions for how the search engine should handle each page on your website.

Speed Up Your Magento Store by 300%

In Magento 2, generating an XML sitemap is a straightforward process that can help boost your website’s SEO. Here’s a step-by-step guide on how to use XML sitemap for Magento 2.

Step 1: Enable Sitemap

Before you can generate an XML sitemap, you need to enable the sitemap feature in Magento 2. To do this, log in to your Magento 2 dashboard and go to Stores > Configuration > Catalog > XML Sitemap.

Under the XML Sitemap section’s General Settings tab, set the Enabled field to Yes. You can also set other options, such as the sitemap’s default filename and its maximum file size. Save your changes by clicking on the Save Config button.

Step 2: Generate Sitemap

Now that you’ve enabled the sitemap feature, you can generate an XML sitemap for your website. To do this, go to Marketing > SEO & Search > Site Map in your Magento 2 dashboard.

Click on the Add Sitemap button, where you can create a new sitemap. Fill in the required fields, such as the sitemap’s filename and path and set up options such as the sitemap’s default frequency and priority.

You can also choose which pages to include in your sitemap by setting the Included URLs field. For example, you may want to exclude certain pages that don’t need to be indexed, such as a thank you page after completing an order.

Once you’ve completed all the necessary fields, click on the Save & Generate button. Magento 2 will then create your sitemap and save it to the specified location.

Step 3: Submit Sitemap to Search Engines

After generating your XML sitemap, the next step is to submit it to search engines. This tells search engines about the pages on your website that they should index, helping improve your website’s visibility in search results.

To submit your sitemap to search engines, log in to the search engine’s webmaster tools – such as Google Search Console or Bing Webmaster Tools – and navigate to the sitemap submission section. Enter the URL of your sitemap and submit it.

Conclusion

In conclusion, generating an XML sitemap in Magento 2 is an essential step towards improving your website’s SEO. By following the above steps on how to use XML sitemap for Magento 2, you can create a sitemap file that accurately represents your website’s content and provides search engines with a clear path to crawl and index your website.

Scroll to Top