How to Remove Image URL from sitemap.xml in Magento 2
As per Google, a sitemap can contain a maximum of 50000 URLs with a maximum size of 50 MB (Uncompressed). If you have a bigger website having thousands of URLs, you may require to exclude image URLs from the sitemap to fit the validation or you need to breakdown the list in multiple sitemaps. SEOs may want sometimes to focus only on crawling pages and not the images. It’s because Google automatically indexes images when it indexes the pages. And thus, you may want Google to focus on your pages prior to images. So, you need to remove image URL from sitemap.xml in Magento 2.
The easy-to-follow steps mentioned below will remove the image URLs and not allow search engine bots to crawl them!
Steps to Remove Image URL from sitemap.xml in Magento 2:
- Login to admin panel
- Navigate to Stores > Configuration > Catalog > XML Sitemap
- Expand Product Options
- Set “None” to Add Images into Sitemap
Can it be any simpler! 😄
Still, the readers can always discuss any issues with the solution in the Comments section below and I’d be happy to help.
You can also refer to Remove Image URL from sitemap.xml in Magento 2 from our Magento 2 video tutorial series:
Feel free to share the solution with fellow developers and SEOs via social media.
Thanks.
Sanjay Jethva
Sanjay is the co-founder and CTO of Meetanshi with hands-on expertise with Magento since 2011. He specializes in complex development, integrations, extensions, and customizations. Sanjay is one the top 50 contributor to the Magento community and is recognized by Adobe.
His passion for Magento 2 and Shopify solutions has made him a trusted source for businesses seeking to optimize their online stores. He loves sharing technical solutions related to Magento 2 & Shopify.
2 Comments
sitemap is getting generated with Add images into sitemap selected to “None” but not getting generated when selected to “All”
Hello Upendra,
The above solution is to remove the image URL. If you are following the above steps and still face the issue, it might be due to something else.
Thanks.