XML Sitemap Generator & Validator · Tutorial

How to find and fix errors in a sitemap.xml

6 min readbeginnerUpdated

Search console reports problems with your sitemap, but not clearly. You will check the file, work through each error and warning, and end with a clean sitemap.

What you need

Steps

  1. Paste the sitemap

    Open your sitemap in a browser, copy the XML and paste it, or load the example with several common mistakes.

  2. Make URLs absolute

    /about/ is reported as a path. Change it to https://example.com/about/.

  3. Fix the date and the hints

    30/10/2026 must become 2026-10-30. sometimes isn’t an allowed change frequency, and a priority of 2 is outside 0.0–1.0.

    <lastmod>2026-10-30</lastmod>
    <changefreq>monthly</changefreq>
    <priority>0.8</priority>
  4. Clean up warnings

    Remove the second home page entry, and decide whether www.example.com or example.com is your site; list only that host.

  5. Validate again

    When the message says no problems were found, upload the file and resubmit it in search console.

Try it yourself

Opens the XML Sitemap Generator & Validator with this tutorial's sample loaded.

Try it now

Common mistakes

Fixing the file but not the generator
If a plugin or build script made the mistakes, fix it too, or the next build brings them back.
Using local date formats
Sitemaps always use year-month-day, whatever your site’s language.

Next steps

Go back to the XML Sitemap Generator & Validator, or keep going with one of these: