Magento 2 XML sitemaps after catalogue changes: URL scope and generation checks

4 min read

Silver sitemap index linked to page cards through pale green paths

A new guide has been published, category addresses have changed and some products have been withdrawn. An older XML sitemap can still load successfully while describing an outdated set of pages. Accepting its replacement therefore means checking its contents, language and actual publication state.

Kowal Google Sitemap provides store-view profiles, selectable URL sources and exclusions, and generation controls. Start with a small, explicit sample of addresses. It makes the selection rules testable before a schedule is enabled for the entire catalogue.

Define a sample with expected outcomes

Choose an active product, category, CMS page and new article. Add one address that should be excluded and an example of deleted or inactive content. Record the expected behaviour and store view for each item. Without this list, a long XML document can easily be mistaken for proof that the result is correct.

Use real public pages rather than invented paths. Check their HTTP responses and canonical URLs. If those disagree, decide which address should represent the content first. Sitemap generation does not replace decisions about redirects, visibility or the configuration of other SEO extensions.

Let the profile define the scope

In administration, open Modules → Sitemap → Maps and Configuration. Choose the store view, index filename, sources and exclusions. The core supports products, categories, active CMS pages and additional URLs. Other content integrations require the relevant source modules and enabled adapters.

Posts created with Kowal Blog make a useful acceptance case. They use the catalogue technically, but still need the correct blog context and an active sitemap integration. Check posts, categories and eligible tags rather than assuming every blog-related page will be included. The guide to a catalogue-based Magento blog explains how those objects are organized.

Run a trial generation first

The --dry-run option collects and qualifies addresses, checks XML entries and relationships, and does not publish replacement maps. In bin/magento kowal:sitemap:generate --id=1 --dry-run --format=json, the number is only an example: use your own profile identifier. Keep the report and compare it with the sample defined earlier.

If a page is missing, check its active state, selected source, adapter and exclusion rules in that order. Exclusions can cover complete URLs, paths with a * wildcard and categories including their descendants. An overly broad rule can remove more content than intended. Correct the rule and rerun the trial before publication.

Language relationships need genuine counterparts

Language profiles share a hreflang group while using different store views and unique language codes. CMS counterparts need explicit mapping through a shared key. Similar page titles do not by themselves demonstrate that the generator recognizes a translation relationship.

Open the counterparts in the sample and compare their purpose. Do not substitute another language's home page for a missing translation. After changing translations, regenerate every profile in the group so the relationships describe the same content state. Also check that an excluded page has not remained as an alternate attached to another URL.

A queued request is not yet a published file

The Generate button adds a job to a queue processed by Magento cron every five minutes. Clicking it does not prove generation has completed. Inspect the history, status and report, then retrieve the public index and the XML parts it references.

The module prepares and validates a new generation before switching the index. Large sitemaps are split into parts. Check the availability of those files as well as the index itself. Find the sample addresses and confirm that a CDN is not still returning an earlier version of the document.

Switch the advertised sitemap after acceptance

The first generation should not take over another generator's file; choose an unused filename. After the new set passes inspection, establish the correct sitemap reference and schedule. The robots option applies to Magento's dynamic robots.txt. A static file or CDN layer needs separate handling in the deployment process.

A sitemap organizes URLs made available to a search engine; it does not guarantee indexing. The practical acceptance outcome is a current public index, consistent component files and a repeatable generation report. Check the Kowal Google Sitemap offering for available sources and integrations.

Previous Next

KOWAL.BLOG

Choose your language

Available versions open the corresponding page. More languages are being prepared.

English (UK) Français Deutsch Español Italiano Português Nederlands Svenska Dansk Norsk Suomi Lietuvių Latviešu Eesti Čeština Slovenčina Magyar Română Български Ελληνικά Slovenščina Hrvatski Polski English (US)