Advanced XML Sitemaps for Magento 2: Image Support, Filtering & Priority Control

Learn how to configure advanced XML sitemaps in Magento 2 with image support, smart filtering, priority control, and change frequency settings to improve search engine crawling.

Advanced XML Sitemaps for Magento 2: Image Support, Filtering & Priority Control

Your Magento 2 Sitemap Is Telling Search Engines the Wrong Things

Every time Googlebot visits your Magento 2 store, it has a limited budget for how many pages it will crawl during that session. This is called your crawl budget, and your XML sitemap is the single most important signal telling Google where to spend it. Yet most Magento 2 store owners never touch their sitemap configuration beyond the initial setup. The result is a sitemap full of URLs that waste crawl budget: out-of-stock products, disabled items, empty categories, and pages with identical priority values that give Google no guidance on what matters most.

The consequences are measurable. A study by cognitiveSEO analyzing over 4 million URLs found that pages not included in a well-structured XML sitemap take 30 to 50 percent longer to get indexed. For a store launching new products weekly, that delay means lost organic traffic during the critical first days when a product page is fresh and most likely to rank for long-tail queries. Meanwhile, Google wastes time re-crawling discontinued products that return 200 status codes instead of discovering your newest arrivals.

Magento 2 includes a basic sitemap generator. It works. It produces a valid XML file. But it offers zero control over priority values, does not include product images, cannot exclude out-of-stock products, and gives you no way to filter what goes in and what stays out. Every URL gets the same treatment regardless of its importance to your business.

If you sell 5,000 products and 800 of them are out of stock, your default Magento 2 sitemap tells Google to crawl all 5,000 with equal urgency. That is a misallocation of your crawl budget, and it is costing you traffic every single day.

What Is MageRa XML Sitemap (and Why Your Magento 2 Store Needs It)

MageRa XML Sitemap is an advanced sitemap extension for Magento 2 that enhances the default sitemap functionality with three capabilities Magento 2 does not provide out of the box: image support, smart filtering, and customizable priority and change frequency settings.

Think of it this way. Magento 2's default sitemap is like handing Google a phone book. Every entry is listed alphabetically with no indication of which pages are your top sellers, which are seasonal, or which have been discontinued. MageRa XML Sitemap turns that phone book into a curated directory. You tell Google exactly which pages matter, how often they change, and which images to index alongside them.

The extension integrates directly into Magento 2's native sitemap configuration under Stores > Configuration > MageRa > XML Sitemap, so you configure everything from within the admin panel you already use. No server-level file editing. No custom code. No SSH access required.

MageRa XML Sitemap is the right fit for any Magento 2 store with a catalog of 100 or more products, stores that rely on Google Images traffic, and any merchant who has ever found out-of-stock products still appearing in search results. It is not necessary for a brand-new store with 10 products where the default sitemap covers everything adequately. But the moment your catalog grows, the limitations of the default become your liability.

For a complete SEO toolkit covering all pillars, see MageRa SEO Suite Ultimate.

Key Features of MageRa XML Sitemap for Magento 2

Image Sitemap Support

Google processes billions of image searches every day. Product image searches carry high purchase intent because someone searching for "blue running shoes Nike" in Google Images is likely looking to buy. But Google can only index your product images if it knows they exist. Without image tags in your XML sitemap, Google relies entirely on crawling your HTML pages and extracting image URLs, which is slower and less reliable.

MageRa XML Sitemap adds image entries to your sitemap using the Google Image Sitemap format. Each product URL includes its associated images with captions and titles. You control the caption type, choosing between alt text or product labels, and the title type, choosing between product names or custom titles. If a product has multiple images, all of them are included, giving Google a complete inventory of your visual assets.

Configurable Priorities

Priority values range from 0.0 to 1.0 and tell Google how important a URL is relative to other URLs in your sitemap. Magento 2's default sitemap assigns the same priority to every URL. MageRa XML Sitemap lets you set different priority values for products, categories, and CMS pages independently.

A typical configuration sets categories at 0.9 (your highest-value landing pages), products at 0.8 (your revenue generators), and CMS pages like "About Us" and "Contact" at 0.5 (important but not revenue drivers). This hierarchy signals to Google where to prioritize crawling when it has limited time on your site.

Change Frequency Control

Changefreq tells Google how often a page is likely to change, which helps the crawler allocate its resources efficiently. A product page that gets daily inventory updates should be marked "daily." A static CMS page like your return policy should be marked "monthly" or "yearly." Categories that update whenever new products are added benefit from "weekly."

MageRa XML Sitemap lets you define changefreq independently for products, categories, and CMS pages. You choose from: always, hourly, daily, weekly, monthly, yearly, or never. This is not a directive Google must follow, but it is a strong suggestion that influences crawl behavior, especially for stores where crawl budget is a bottleneck.

Smart Filtering

This is where MageRa XML Sitemap delivers the biggest crawl budget savings. You can exclude four types of low-value URLs from your sitemap:

  • Out-of-stock products: Why tell Google to crawl a product page that displays "Out of Stock" and cannot be purchased? Excluding these frees crawl budget for in-stock products that generate revenue.
  • Disabled products: Products you have disabled in the admin should not appear in your sitemap. The default Magento sitemap does not make this distinction.
  • Empty categories: Categories with zero products offer no value to searchers and dilute your sitemap quality. Excluding them keeps your sitemap focused on pages with actual content.
  • Maximum category depth: If you have deeply nested category structures (Clothing > Men > Tops > T-Shirts > Graphic), you can set a maximum depth beyond which subcategories are excluded. This prevents Google from crawling deep archival categories while still indexing your primary navigation paths.

You also have the option to include or exclude product variants. Configurable products in Magento 2 have child simple products. Including variants in your sitemap can be useful if each variant has a unique URL, but it can also create thousands of near-duplicate entries. MageRa XML Sitemap gives you the toggle to decide what works for your store.

Canonical URL Support

MageRa XML Sitemap can use canonical URLs instead of direct URLs in your sitemap entries. This ensures that when Google encounters a product accessible from multiple category paths, the sitemap points to the canonical version. This reduces duplicate content signals and consolidates link equity onto a single, authoritative URL.

Admin Configuration

Screenshot of the MageRa XML Sitemap admin configuration panel in Magento 2, showing product settings, category settings, and image inclusion options

How Image Sitemaps Drive Google Images Traffic to Your Store

Google Images accounts for approximately 22 percent of all web searches. For ecommerce stores, image search traffic is uniquely valuable because it is visually driven and purchase-intent rich. A customer who finds your product through Google Images has already seen what it looks like and is clicking through because they want to learn more or buy.

Without image entries in your XML sitemap, Google discovers product images by crawling your HTML and parsing <img> tags — slow work that can take days or weeks for new products. Image sitemap entries bypass this delay by explicitly listing every image URL alongside its product.

Here is what an image sitemap entry looks like when MageRa XML Sitemap includes it:

<url>
  <loc>https://example.com/blue-running-shoes.html</loc>
  <lastmod>2026-05-30</lastmod>
  <changefreq>weekly</changefreq>
  <priority>0.8</priority>
  <image:image>
    <image:loc>https://example.com/media/catalog/product/blue-running-shoes.jpg</image:loc>
    <image:caption>Blue Running Shoes - Side View</image:caption>
    <image:title>Nike Air Max Blue Running Shoes</image:title>
  </image:image>
</url>

The <image:image> block gives Google the image location, a caption, and a title, making it more confident about indexing the image and showing it in image search. For stores with visually distinctive products (fashion, furniture, jewelry, home decor), image sitemaps can meaningfully increase Google Images traffic.

MageRa XML Sitemap lets you configure how captions and titles are generated — caption from alt text, image label, product name, or none; title likewise — so entries are descriptive and keyword-relevant without manual input for every image.

Smart Filtering: Stop Wasting Crawl Budget on Dead URLs

Crawl budget is not an abstract concept. It is a finite resource that Google allocates to every website. Google has confirmed that crawl budget matters most for large sites (over 10,000 URLs) and sites with frequently changing content, which describes most mid-to-large Magento 2 stores. Every URL Google crawls that returns low-value content is a URL it does not spend crawling your newest products or highest-converting pages.

MageRa XML Sitemap's filtering features directly address this. Here is how each filter protects your crawl budget:

Exclude out-of-stock products. An out-of-stock product page still returns 200, so Google can crawl, index, and rank it — but searchers who land on "Out of Stock" bounce, sending negative signals. Excluding them keeps Google from prioritizing them; when stock returns, regenerate and they reappear automatically.

Exclude disabled products. Magento 2's default sitemap does not check product status. MageRa XML Sitemap filters out products you have turned off in the admin so only enabled products consume crawl budget.

Exclude empty categories. Empty categories are navigation dead ends with no products and no content. Excluding them keeps your sitemap tight and focused on pages worth crawling.

Maximum category depth. Deeply nested categories often have thin content and low search volume. Setting a maximum depth (for example, excluding categories below level 3) keeps Google focused on the primary and secondary category pages that drive most category-level traffic.

Product variant control. A configurable product with 20 size/color combinations creates 20 near-identical child URLs. MageRa XML Sitemap lets you include only the parent configurable URL, shrinking the sitemap and eliminating duplicate-content concerns.

The net effect of these filters is a sitemap that contains only crawl-worthy URLs. For a store with 5,000 products where 800 are out of stock and 50 categories are empty, smart filtering reduces the sitemap from over 5,000 URLs to approximately 4,200 high-value URLs. That is an 16 percent reduction in crawl budget waste, which translates directly into faster indexing of new products and updated pages.

XML Sitemap Preview

Screenshot showing a generated XML sitemap file in the browser, with product URLs, image tags, priority values, and change frequency settings

How to Set Up MageRa XML Sitemap in Magento 2

Step 1: Install the Extension

Install via Composer (recommended):

composer require magera/module-xml-sitemap
php bin/magento module:enable MageRa_XmlSitemap
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento cache:flush

Or copy the module to app/code/MageRa/XmlSitemap/ and run the same setup commands.

Step 2: Enable and Configure General Settings

Navigate to Stores > Configuration > MageRa > XML Sitemap (config section magera_xmlsitemap), or use the shortcut at Marketing > XML Sitemap > Configuration. In the General Settings group set Enable XML Sitemap Enhancement to Yes, Include Images to Yes to embed product images in the sitemap, and Use Canonical URLs to Yes if you want canonical URLs instead of direct URLs in sitemap entries.

Step 3: Configure Product Settings

In the Product Settings section, set your defaults:

  • Include Products: Yes
  • Product Priority: 0.8 (recommended for most stores)
  • Change Frequency: Weekly (or Daily if your product data changes frequently)
  • Exclude Out of Stock: Yes (reduces sitemap size and focuses crawl budget)
  • Exclude Disabled: Yes (only active products should appear)
  • Include Variants: Set based on your URL structure. If variants have unique URLs that add value, include them. If they are near-duplicates of the parent, exclude them.

Step 4: Configure Category Settings

Set your category defaults:

  • Include Categories: Yes
  • Category Priority: 0.9 (categories are your primary landing pages)
  • Change Frequency: Weekly
  • Exclude Empty Categories: Yes
  • Max Category Depth: Leave blank to include all categories, or set a number (e.g., 3) to exclude deeply nested subcategories

The section also has CMS Page Settings (with an Exclude CMS Pages multiselect and CMS Page Priority) and an Extra Pages group where you can paste arbitrary URLs (one per line, e.g. /about) with their own priority and change frequency.

Step 5: Configure Image Settings

Enable image support:

  • Enable Image Sitemap: Yes
  • Include Product Images: Yes
  • Include Category Images: Yes (if your categories have assigned images)
  • Image Caption Type: Choose from Alt Text, Image Label, Product Name, or None — select "Alt Text" for descriptive captions
  • Image Title Type: Select "Product Name" for consistent, recognizable titles

For hands-off operation, open the Cron Settings group, set Enable Auto Generation to Yes, and pick a Generation Frequency (Every Hour, Once Daily, or Once Weekly). This drives the magera_xmlsitemap_generate cron job so the sitemap rebuilds on schedule with no manual step.

Step 6: Generate and Submit the Sitemap

Unlike Magento's native sitemap grid, this module generates on demand from its own admin. Go to Marketing > XML Sitemap > Generate Sitemap (admin route xmlsitemap/sitemap/generate) and run the generation; the Sitemap Dashboard (Marketing > XML Sitemap > Sitemap Dashboard) shows the last run, URL count, and timestamp.

You can also generate from the command line — php bin/magento magera:sitemap:generate builds the sitemap for every store, or php bin/magento magera:sitemap:generate --store-id=1 (short form -s 1) targets a single store and prints the file path, URL count, and generation time. For automation pipelines, trigger generation over REST with POST /V1/magera/xmlsitemap/generate and poll GET /V1/magera/xmlsitemap/status.

The file is written to pub/media/sitemap/sitemap.xml for the default store, or sitemap_store_{id}.xml for additional stores — so the public URL is https://yourstore.com/media/sitemap/sitemap.xml. Submit this URL to Google Search Console and Bing Webmaster Tools under Sitemaps.

Step 7: Verify

Open your sitemap URL in a browser. Confirm that products, categories, and CMS pages appear with correct priority values and changefreq tags. Check that image entries are present for products with images. Verify that out-of-stock and disabled products are excluded. If anything is missing, review your configuration settings and regenerate.

MageRa XML Sitemap for Magento 2

MageRa XML Sitemap extends Magento 2's native sitemap capabilities with three focused areas of enhancement: image sitemap support for Google Images indexing, smart filtering to protect crawl budget, and granular priority and change frequency controls by entity type.

Key differentiators:

  • Image sitemap entries with configurable captions and titles using the Google Image Sitemap protocol, supporting multiple images per product.
  • Five filtering options (out-of-stock, disabled, empty categories, max depth, variant control) that reduce sitemap size and focus crawl budget on revenue-generating URLs.
  • Per-entity-type priority and changefreq settings for products, categories, and CMS pages, giving Google clear signals about relative page importance.
  • Canonical URL support to consolidate duplicate URLs and ensure sitemap entries point to authoritative versions.
  • Admin-native integration under Stores > Configuration > MageRa > XML Sitemap, with no server configuration required.

Compatibility: Magento 2.4.6, 2.4.7, 2.4.8, 2.4.9 (Open Source and Commerce), PHP 8.1, 8.2, 8.3. Requires MageRa_Base module and Magento_Sitemap module.

Visit magera.ca for details.

XML Sitemap Best Practices for Magento 2 Store Owners

These practices apply regardless of which sitemap extension you use. They are based on Google's own sitemap guidelines and observed crawl behavior across Magento 2 stores.

Regenerate after major catalog changes. Any time you add or remove products, restructure categories, or change visibility, regenerate. Stale sitemaps listing 404 pages erode Google's trust in the signal — enable the built-in Cron Settings to rebuild daily or weekly.

Submit to both Google and Bing. Google Search Console is obvious, but Bing Webmaster Tools is often overlooked. Bing powers Yahoo search and has its own indexing pipeline, so submitting to both ensures maximum coverage.

Reference your sitemap in robots.txt. Add Sitemap: https://yourstore.com/media/sitemap/sitemap.xml to robots.txt so search engines discover it even without manual submission. The sitemap lives at a predictable URL, making this a one-time configuration.

Keep priority values relative, not absolute. Google uses priority as a relative signal between your URLs, not a ranking factor. Setting every URL to 1.0 tells Google nothing; categories at 0.9, products at 0.8, and CMS pages at 0.5 gives it meaningful differentiation.

Use changefreq honestly. Marking every page "hourly" when content changes weekly wastes the signal. Google learns which pages actually change and adjusts crawling, so mismatches reduce effectiveness where it matters.

Monitor your sitemap in Search Console. The Sitemaps report shows how many URLs Google discovered, how many it indexed, and why some were excluded. A large gap between discovered and indexed URLs signals duplicate content, low-quality pages, or crawl errors to investigate.

Complement your XML sitemap with an HTML sitemap. XML sitemaps serve search engines. HTML sitemaps serve users. Both improve crawlability from different angles. For a user-facing approach, see our guide to Magento 2 HTML sitemap for usability and SEO.

Conclusion

Your XML sitemap is not a set-it-and-forget-it file. It is an active communication channel between your Magento 2 store and search engines. Every URL you include tells Google "this page matters." Every URL you exclude says "skip this." When your sitemap includes out-of-stock products, disabled items, and empty categories alongside your best sellers with identical priority values, you are sending confusing signals that waste crawl budget and delay indexing of the pages that actually drive revenue.

MageRa XML Sitemap fixes this by giving you control over what goes into your sitemap and how it is prioritized. Image support brings your product photos into Google Images. Smart filtering removes dead weight. Priority and changefreq settings give Google clear, differentiated signals. The result is a sitemap that actively works to get your most important pages indexed faster and crawled more often.

Stop letting Magento 2's default sitemap decide what search engines see. MageRa XML Sitemap puts you in control. Get started today.

FAQ

Q1: How does including images in my XML sitemap improve my search rankings?

A1: Image sitemap entries do not directly improve rankings, but they accelerate Google's discovery and indexing of your product images. When Google has explicit image URLs in your sitemap, it indexes them faster than it would by crawling your HTML pages alone. This leads to your products appearing in Google Images results sooner, which drives purchase-intent traffic to your store. Stores with strong visual products (fashion, home goods, jewelry) typically see a measurable increase in Google Images referral traffic within weeks of enabling image sitemaps. The key benefit is speed of indexing, not a ranking boost.

Q2: Should I exclude out-of-stock products from my sitemap even if they will come back in stock later?

A2: Yes, exclude them. When a product is out of stock, its page provides a poor user experience. Searchers who find it in Google results and click through encounter an "Out of Stock" message, which leads to an immediate bounce. That bounce sends negative behavioral signals back to Google. Excluding out-of-stock products prevents this cycle. When inventory is restocked, simply regenerate your sitemap and the product reappears automatically. This approach keeps your sitemap focused on pages that convert while protecting the user experience signals Google uses to evaluate your store's quality.

Q3: Can I use MageRa XML Sitemap alongside other MageRa SEO extensions?

A3: Yes. MageRa XML Sitemap integrates with Magento 2's native sitemap module and works independently of other SEO extensions. It does not conflict with MageRa Rich Snippets, MageRa SEO Redirect, or MageRa SEO Suite. In fact, using XML Sitemap with other MageRa SEO extensions creates a complementary system: your sitemap tells search engines what to crawl, your schema markup tells them what your content means, and your redirects preserve equity when URLs change. For stores that want all of these capabilities bundled together, MageRa SEO Suite Ultimate includes XML sitemap management alongside nine other SEO modules in a single extension.

Internal Links

End of post

Comments (0)

Be the first to comment.

Ready to ship better Magento 2 stores?

64 premium extensions, one quality bar. Composer install, 30-day money-back guarantee.