XML Sitemap Validator

Instantly validate your XML sitemap for errors, broken structure, and Google compliance — free, no login required.

Most sitemaps live at /sitemap.xml or /sitemap_index.xml
— or —
Advertisement Banner (728x90)

Free XML Sitemap Validator — Check Your Sitemap Before Submitting to Google

An invalid XML sitemap can silently block Google from indexing your pages — and you'll never know until you check. This free XML sitemap validator scans your sitemap for syntax errors, missing required tags, malformed URLs, incorrect date formats, and compliance issues with the official sitemaps.org protocol. Paste your XML or enter your sitemap URL and get instant results.

What Is an XML Sitemap?

An XML sitemap is a file that lists every important URL on your website and tells search engines like Google, Bing, and Yandex where to find them. Think of it as a roadmap — without it, crawlers must discover pages through internal links alone, which can miss newly published or deeply nested content.

A valid XML sitemap follows the sitemaps.org protocol — the universal standard supported by Google, Bing, Yahoo, and other major search engines. Even small formatting errors can cause the entire file to be rejected by Google Search Console.

Correct XML Sitemap Structure (Copy-Paste Template)

Here is a valid, minimal XML sitemap that passes all validation checks:

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">

  <url>
    <loc>https://example.com/</loc>
    <lastmod>2025-01-15</lastmod>
    <changefreq>weekly</changefreq>
    <priority>1.0</priority>
  </url>

  <url>
    <loc>https://example.com/about</loc>
    <lastmod>2024-11-20</lastmod>
    <changefreq>monthly</changefreq>
    <priority>0.8</priority>
  </url>

</urlset>

Every valid XML sitemap must include:

Sitemap Index File Template (For Large Sites)

If your site has more than 50,000 URLs or your sitemap exceeds 50MB, split it into multiple files and reference them in a sitemap index:

<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">

  <sitemap>
    <loc>https://example.com/sitemap-pages.xml</loc>
    <lastmod>2025-01-15</lastmod>
  </sitemap>

  <sitemap>
    <loc>https://example.com/sitemap-posts.xml</loc>
    <lastmod>2025-01-14</lastmod>
  </sitemap>

</sitemapindex>

How to Validate Your Sitemap

  1. Find your sitemap URL — try yourdomain.com/sitemap.xml or check your robots.txt file for a Sitemap: directive.
  2. Enter the URL or paste content into the validator above and click "Validate Sitemap."
  3. Review the results — errors are shown with specific line numbers and explanations so you know exactly what to fix.
  4. Fix the issues — use the error table below as a reference guide.
  5. Revalidate after making fixes to confirm everything passes.
  6. Submit to Google Search Console — go to Sitemaps → Add a new sitemap → enter your URL → Submit.

10 Most Common XML Sitemap Errors (And How to Fix Them)

Error What Causes It How to Fix It
Wrong or missing namespace The xmlns attribute is absent or incorrect Add xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" to your <urlset> tag
Missing XML declaration File doesn't start with <?xml ...?> Add <?xml version="1.0" encoding="UTF-8"?> as the very first line
Relative URLs in <loc> Using /page instead of full URL Always use absolute URLs: https://example.com/page
Wrong date format in lastmod Using 01/15/2024 or January 15 2024 Use ISO 8601 format: 2024-01-15
Unclosed XML tags Missing </url> or </urlset> Ensure every opening tag has a matching closing tag
Unescaped special characters Raw &, <, or > in URLs Replace with &amp;, &lt;, &gt;
File too large Sitemap exceeds 50MB or 50,000 URLs Split into multiple sitemaps and use a sitemap index file
404 or blocked URLs included Deleted pages or noindex pages in sitemap Remove non-200 URLs and pages blocked by robots.txt or noindex tags
HTTP URLs on HTTPS site Using http:// when site has SSL Update all <loc> values to use https://
Duplicate URLs Same URL listed multiple times Remove duplicates — each URL should appear once only

XML Sitemap Tags Explained

<loc> — Required

The full URL of the page. This is the only required tag inside <url>. Must be an absolute URL using the correct protocol (https:// if your site uses SSL). Special characters like & must be escaped as &amp;.

<lastmod> — Optional but Recommended

The date the page was last significantly modified, in YYYY-MM-DD format (ISO 8601). Google uses this to prioritize recrawling updated content. Only set this if the page was genuinely updated — fake or inflated lastmod dates cause Google to distrust the entire sitemap.

<changefreq> — Optional (Largely Ignored by Google)

A hint about how often the page changes. Valid values: always, hourly, daily, weekly, monthly, yearly, never. Note: Google has confirmed it largely ignores this tag and relies on its own crawl data instead.

<priority> — Optional (Largely Ignored by Google)

A relative priority from 0.0 to 1.0. Default is 0.5. This is relative to other pages on your site — it does not affect how Google ranks you versus competitors. Google also largely ignores this tag. Setting every page to 1.0 has no benefit.

XML Sitemap Best Practices for SEO

How to Find Your Website's Sitemap URL

Not sure where your sitemap is? Try these locations in order:

  1. https://yourdomain.com/sitemap.xml
  2. https://yourdomain.com/sitemap_index.xml
  3. Check your robots.txt at https://yourdomain.com/robots.txt — look for a line starting with Sitemap:
  4. In WordPress: check your SEO plugin (Yoast, Rank Math, All-in-One SEO) — they auto-generate sitemaps
  5. In Shopify: sitemap is at https://yourstore.myshopify.com/sitemap.xml

Frequently Asked Questions

Does Google require a sitemap?

Not strictly — Google can discover pages through internal links. However, a sitemap significantly helps for new sites, large sites (1,000+ pages), sites with weak internal linking, and pages that are not linked from other pages. Google officially recommends submitting a sitemap via Search Console.

What's the maximum size of an XML sitemap?

Each sitemap file can contain a maximum of 50,000 URLs and must not exceed 50MB uncompressed. For larger sites, create a sitemap index file that references multiple individual sitemaps. A sitemap index itself can reference up to 50,000 sitemaps.

Why does Google Search Console say my sitemap has errors?

The most common reasons are: including URLs that return 404 errors, using HTTP URLs on an HTTPS site, including pages blocked by robots.txt or noindex tags, incorrect XML formatting, or the sitemap file itself returning an error when fetched. Validate your sitemap here first, then resubmit in Search Console.

Should I update lastmod every time I update my site?

Only if the page content actually changed. Updating lastmod on every deploy — even when page content is unchanged — causes Google to distrust your lastmod values and may reduce crawl efficiency. Set it only when content is genuinely modified.

Does having a sitemap improve my Google rankings?

A sitemap doesn't directly boost rankings, but it ensures your pages get discovered and indexed — a prerequisite for ranking at all. Without proper indexing, even excellent content will receive zero organic traffic. For new sites especially, a sitemap dramatically speeds up initial indexing.

What's the difference between a sitemap validator and a sitemap checker?

A validator checks the XML structure — syntax, tags, namespaces, and format compliance. A checker tests whether the sitemap is accessible and that the listed URLs return valid HTTP responses. Ideally, use both: validate the format first, then check that all URLs are live and returning 200 status codes.

Can I have multiple sitemaps on one website?

Yes, and for large sites it's recommended. You can separate sitemaps by content type — e.g. sitemap-pages.xml, sitemap-posts.xml, sitemap-products.xml — and reference all of them in a sitemap index file. This makes it easier to diagnose which section has crawl issues.

Related SEO Tools

Advertisement Banner (728x90)