Sitemap Validator

Validate XML sitemaps for errors, broken URLs, and protocol compliance.

Enter the full URL of your XML sitemap

Why Validate Your XML Sitemap?

A well-formed XML sitemap is essential for Search Engine Optimization (SEO). Before submitting your sitemap to Google Search Console or Bing Webmaster Tools, verifying its structure ensures search engine crawlers can efficiently discover all your pages.

What does this tool check?

  • XML Syntax: Ensures the file is well-formed with no unescaped characters or broken tags.
  • Protocol Compliance: Verifies required tags like <urlset> and <loc> are present and correctly nested.
  • Limit Restrictions: Checks that the sitemap does not exceed the maximum allowed 50,000 URLs or 50MB file size limit.
  • Broken Links: Checks every URL in your sitemap to find 404 (Not Found) errors or unexpected 301 redirects natively.
  • robots.txt Integrity: Analyzes your domain's robots.txt file to ensure your sitemap is correctly declared.

Frequently Asked Questions

Why is my XML sitemap not valid?

XML sitemaps can be invalid due to syntax errors, missing required tags, or exceeding limits (50,000 URLs or 50MB). Common issues include broken URLs or incorrect last modification date formats.

What does "Sitemap is not well-formed" mean?

This means your sitemap has an underlying syntax error. It usually happens if tags are not closed properly or if forbidden characters (like &, <, >) are used without escaping them.

How do I check for broken links in my sitemap?

You can use the 'Check URL Status' feature in our Sitemap Validator. It will sequentially run batch requests to test every URL in your sitemap, returning standard HTTP 200 (OK), 404 (Not Found), or 301 (Redirect) statuses.

XML Sitemap Examples & Patterns

These ready-to-use sitemap examples cover the most common configurations. Click any example to load it into the validator above.

Basic XML sitemap

The standard format accepted by Google, Bing, and all major search engines. Every URL should have a <loc>; <lastmod> and <priority> are optional but recommended.

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://example.com/</loc>
    <lastmod>2024-01-15</lastmod>
    <changefreq>weekly</changefreq>
    <priority>1.0</priority>
  </url>
  <url>
    <loc>https://example.com/about/</loc>
    <lastmod>2024-01-10</lastmod>
    <priority>0.8</priority>
  </url>
</urlset>

Check: Validator confirms well-formed XML, valid namespace, and correct <lastmod> date formats.

Sitemap index file

Large sites (10,000+ pages) should split their sitemap into multiple files and reference them from a sitemap index. Each child sitemap can have up to 50,000 URLs.

<?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>2024-01-15</lastmod>
  </sitemap>
  <sitemap>
    <loc>https://example.com/sitemap-blog.xml</loc>
    <lastmod>2024-01-14</lastmod>
  </sitemap>
  <sitemap>
    <loc>https://example.com/sitemap-products.xml</loc>
    <lastmod>2024-01-13</lastmod>
  </sitemap>
</sitemapindex>

Check: Validator detects <sitemapindex> and lists the child sitemaps. Submit the index URL to Google Search Console — it will automatically discover all child files.

Google News sitemap

News publishers use this extended sitemap format to get articles into Google News within minutes of publication. Articles must be less than 2 days old to qualify.

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
        xmlns:news="http://www.google.com/schemas/sitemap-news/0.9">
  <url>
    <loc>https://example.com/news/tech-update-jan-2024</loc>
    <news:news>
      <news:publication>
        <news:name>Example News</news:name>
        <news:language>en</news:language>
      </news:publication>
      <news:publication_date>2024-01-15T09:00:00Z</news:publication_date>
      <news:title>Major Tech Update Released</news:title>
    </news:news>
  </url>
</urlset>

Check: Validator confirms the file is well-formed. For News sitemaps, Google also requires your site to be approved in Search Console.

Common mistakes — can you spot them? ⚠

This sitemap has 3 errors that will prevent search engines from reading it correctly. Load it to see the validator flag each one.

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://example.com/about</loc>
    <lastmod>Jan 15, 2024</lastmod>
  </url>
  <url>
    <loc>https://example.com/page</loc>
  </url>
  <url>
    <loc>https://example.com/page</loc>
  </url>
  <url>
    <loc>http://other-domain.com/page</loc>
  </url>
</urlset>
  • Invalid lastmod format: Jan 15, 2024 — must be ISO 8601 format: 2024-01-15
  • Duplicate URL: https://example.com/page appears twice — search engines may skip duplicates
  • Mixed domains: http://other-domain.com/page — all URLs must share the same domain as the sitemap