Skip to content
monitorSEO

Main navigation

All articlesTechnical SEO

XML Sitemaps: What to Include and How to Find Errors

A sitemap can be valid XML while listing redirects, deleted pages or URLs excluded from indexing. Checking that the file opens is therefore not enough. Compare its entries with the pages you want Google to show, then verify the sitemap and the destination pages separately.

What a sitemap does

A sitemap provides a list of URLs you identify as important. Google explains how sitemaps support content discovery, but submission guarantees neither crawling nor indexing of every page.

Treat the file as an organized statement you can compare with the website. An important guide should also be reachable through navigation or relevant internal links. A sitemap does not replace site structure or useful content.

For a small site, start with simple questions: is the file accessible, does it list the right URLs and does it update after changes? Do not assume crawl budget is the central issue. Indexing diagnostics helps identify the stage at which a particular page is missing.

Which URLs belong in the sitemap

List pages intended to be public and visible in search. These can include services, products, categories and published guides when each address serves a real purpose. Do not export every CMS record without reviewing its role.

Google’s sitemap-building guidance recommends absolute URLs and preferred canonical versions. List the destination instead of an older URL that redirects to it.

As a working check, look for successful responses, no indexing exclusion and consistency with the intended host, protocol and path. A 200 status is a checkpoint rather than proof of quality: an error page can also return 200. Inspect the content.

Exclude drafts, shopping carts, user accounts and other URLs you do not want in search. A URL parameter is not automatically a mistake; determine whether it represents a separate page or duplicates content. Robots.txt, noindex and canonical serve different purposes and should not be treated as interchangeable controls.

A small sitemap with selection errors

Hypothetical example: the example.com addresses do not represent an audited website. Assume the responses and settings described below. The XML is syntactically valid; its problems concern URL selection.

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://example.com/en/service/</loc>
    <lastmod>2026-10-30</lastmod>
  </url>
  <url><loc>https://example.com/en/old-service/</loc></url>
  <url><loc>https://example.com/en/draft/</loc></url>
  <url><loc>https://example.com/en/removed/</loc></url>
</urlset>
Assumed URL state and sitemap decision
PathAssumed stateAction
/en/service/200, public page, self-referencing canonicalKeep if intended for indexing
/en/old-service/301 to /en/service/Remove the old entry; destination is already listed
/en/draft/200 with noindex; draftExclude the draft and keep its intended restriction
/en/removed/404; permanently removed contentRemove the entry

In this scenario the corrected sitemap contains one URL. Do not remove noindex from a draft simply to make the report consistent. Decide first whether the page should be public. Do not redirect every deleted page to the homepage merely to eliminate an entry error.

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://example.com/en/service/</loc>
    <lastmod>2026-10-30</lastmod>
  </url>
</urlset>

The date represents an assumed significant page update. A real sitemap must reflect reality. This code is a reading example; using it requires your own URLs and a checked generator.

Check file access before individual entries

Open the exact sitemap URL rather than relying on a dashboard preview. Check the HTTP response and content: is it XML, a login screen, an error page or an interactive security challenge? Establish whether the file lists page URLs or points to other sitemap files.

Check syntax, encoding and absolute addresses. The Sitemaps protocol defines the XML format. Separate a parser failure affecting the whole file from a problem with an individual entry. After a fix, fetch the file again to verify the output rather than just the CMS configuration.

Then compare entries with page status, final URL, noindex, canonical and actual content. Start with important pages and examples from each group. If the cause is a template or generator rule, extend checks to the whole affected group. Record whether the review covered a sample or the complete list.

A missing important page may reflect an export exclusion rather than a page failure. Conversely, removing an entry from the sitemap does not automatically remove the URL from Google’s index. A technical SEO audit helps organize these dependencies.

Splitting maps and checking language versions

One sitemap need not contain everything. A single file is limited to 50,000 URLs or 50 MB uncompressed; split it when it exceeds a limit. A sitemap index lists sitemap files rather than content pages.

On a smaller site, separating services and guides may make review easier, but is not itself a ranking improvement. Choose a structure your generator can maintain without manually copying entries. Check that child files remain accessible and current.

Review PL, EN, DE and ES separately. Do not list translated pages that do not exist yet. Each entry should correspond to a real page in its language. A sitemap does not replace correct language-version configuration. If files are split by language, compare each group’s coverage so that a missing version is not overlooked.

Lastmod should describe a page change

Google explains the value of accurate lastmod dates. Use the date of a significant content update rather than today’s sitemap generation date. Google ignores priority and changefreq.

Ask the CMS maintainer what updates this field. A changed offer or a substantive instruction revision may justify a new date; merely rewriting the sitemap file does not describe a page-content update. If no reliable date exists, omit optional lastmod instead of pretending to know it precisely.

After publishing, changing an address or withdrawing content, confirm that the generator adds, replaces or removes the corresponding entry. Fix a recurring generation rule instead of manually cleaning up the same file every week.

Read the Search Console result correctly

The Search Console Sitemaps report lets you submit a file URL and check processing. Confirm the right property, exact sitemap address and last read date. Submission identifies a file location; it does not upload the entire website into the index.

Successful sitemap processing does not confirm that every listed URL is indexed. If an important page is still absent from Google, inspect that URL separately. Compare its current state with information from the last processing rather than repeatedly resubmitting without finding a cause.

Record whether the issue concerns file access, XML syntax, an unsuitable entry or page indexing. After a repair, verify the same element again. Do not promise a particular search-engine response time.

A short post-change checklist

  • The sitemap and child files are accessible and contain the intended format.
  • Entries lead to intended public pages with appropriate statuses and canonicals.
  • Drafts, removed URLs and unnecessary duplicates stay out of the export.
  • Lastmod reflects significant updates; page additions and withdrawals are handled.
  • Language versions are reviewed and important pages have internal links.
  • Sitemap processing and selected-page indexing are assessed separately.

Start with the generator, one sitemap and a few important URLs. Record the cause, review scope and verification outcome. Internal linking complements this work by helping readers reach content without using an XML file.

Frequently asked questions

What should an XML sitemap contain?

Preferred addresses of public pages you want to show in search. The list should match URL state, canonicals and the intended indexing policy.

Does adding a page to a sitemap guarantee indexing?

No. A sitemap communicates addresses to the search engine, but guarantees neither crawling nor indexing. Inspect important pages separately.

Should redirects and noindex pages be in a sitemap?

An orderly sitemap lists destination URLs intended for indexing. Remove old redirecting entries and exclude intentionally non-indexed pages rather than lifting their restrictions to improve a report.

How often should sitemap lastmod change?

After a significant update to that page, using its actual date. Do not set today’s date for every URL whenever the sitemap is generated.

Why is my sitemap processed but a page missing from Google?

Sitemap processing and page indexing are different stages. Inspect the specific URL, its accessibility, indexing rules and URL Inspection information.