Technical SEO

XML sitemap — a map of canonical URLs

An XML sitemap lists URLs a website wants search engines to discover, optionally with meaningful modification information and supported extensions. It is especially useful for new, large or frequently changing sites.

Published: Updated: 3 min read
Schema: XML sitemap. Addresses - XML - Discovery.

What is an XML sitemap?

An XML sitemap lists URLs a website wants search engines to discover, optionally with meaningful modification information and supported extensions. It is especially useful for new, large or frequently changing sites. It complements normal links; it does not replace an understandable navigation system or guarantee that submitted pages will be indexed or ranked.

What addresses should I include?

Add public, canonical and valuable subpages that return the right content. Skip logging, internal search, tracking variants and intentional noindex. Use full addresses and a consistent protocol and domain. If a map describes language versions, the links must correspond to working translations, not to plans written on the spreadsheet.

Product catalog example

The store has active products, categories and many sorting combinations. The map should reflect preferred cards and useful categories, not every order of identical inventory. After permanently migrating the product, update the sitemap along with the redirection and links. Otherwise, the map continues to recommend addresses to robots that the website itself no longer uses.

Generation and validation

Create the file from the same data source that is responsible for routing. Correctly encode XML characters and split large sets according to format constraints. The lastmod value should describe the actual material change. Check the status, response type and parsability. Only report the correct file in Search Console or indicate it in robots.txt.

Implementation errors

Redirected, incorrect and duplicate addresses reduce the usefulness of the map. The pre-migration copy may point to the old structure. Setting all entries to today's date does not prove freshness. The priority and changefreq fields are not commands that enforce visit frequency or position. First, make sure the addresses and content are correct.

How to use reports?

Check retrieval and syntax errors, compare reported addresses with canonical and exclusion reasons. The difference in the number of reported and indexed addresses is a signal to be checked, not a ready diagnosis. Assess whether the omitted resources are actually distinct and valuable. Automatic post-deployment validation prevents the publication of corrupt XML or accidental duplicates.

What addresses should be removed from the map?

Include target, canonical pages for indexing in your sitemap. Addresses that return a redirect, error, or noindex usually introduce a contradictory signal to this purpose. Do not treat the export of all database records as a ready-made map: a working record and a published page are not the same. In a large collection, divide the maps logically so that the problem can be found in a specific group, within the limits of the format.

Lastmod should reflect a significant content change, not every script run. You can add an image map to your illustrations, maintaining public access to the selected resources. After deployment, download the XML from the domain and check the response code, correct syntax and sample addresses. The local file may be valid, while the hosting returns an HTML error page or a redirect to another environment.

Sources and further reading

Use the primary documentation to check the principles and limitations described in this article.

How we prepare the glossary

These articles combine original editorial work, AI support for editing and translation, and checks against linked primary documentation. Examples are illustrative unless stated otherwise; they do not represent client results. Dates refer to publication and actual content changes.

From knowledge to action

Need help putting this into practice?

Tell us about your website or process. We will define the scope and the next practical step.

Discuss your project