backlinks.fyi
HomeDirectoriesToolsExtensionBlogShowcasePricing
Sign inGet Started Free→
HomeDirectoriesToolsExtensionBlogShowcaseSubmit StartupPricing
Sign inGet Started Free
Home›Free Tools›XML Sitemap Validator
SEO & site checks

XML Sitemap Validator

Check any sitemap or sitemap index for malformed XML, bad URLs, duplicate entries, invalid lastmod dates, and size-limit violations — with specific fixes for every issue found.

Checks well-formed XML, the sitemaps.org protocol, and size limits (up to 50,000 URLs). Sitemap index files are followed into child sitemaps. Need to export these URLs?

What an XML Sitemap Is Made Of

An XML sitemap is a machine-readable inventory of the URLs you want search engines to crawl. Every valid sitemap starts with an XML declaration, opens with a <urlset> element bound to the sitemaps.org namespace, and then lists one <url> entry per page. Each entry carries a required <loc> (the fully-qualified URL) and an optional <lastmod> (when that page last changed meaningfully). Optional tags like changefreq and priority still appear in older exports, but Google has ignored them for years — including them is harmless, relying on them is not.

A minimal, well-formed sitemap looks like this:

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

The most common structural mistake is a document that looks right but breaks the rules silently: a relative <loc> like /blog/post-one, a URL missing its scheme, a typo in the namespace, or a stray character that makes the XML unparseable. Here is the same sitemap with three defects a validator will catch immediately:

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/wrong-ns">
  <url>
    <loc>/blog/post-one</loc>
    <lastmod>01/15/2026</lastmod>
  </url>
  <url>
    <loc>https://example.com/pricing</loc>
  </url>
</urlset>

Line by line: the namespace URL is not the sitemaps.org 0.9 schema, /blog/post-one is relative instead of absolute, and 01/15/2026 is not a W3C date. Any one of these can cause entries to be skipped or the whole file to be rejected.

urlset vs. sitemapindex

There are exactly two legal root elements. A <urlset> is the list of pages described above. A <sitemapindex> is a table of contents that points at other sitemap files, which is how large sites stay inside the per-file limits:

<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <sitemap>
    <loc>https://example.com/sitemap-pages.xml</loc>
    <lastmod>2026-02-01</lastmod>
  </sitemap>
  <sitemap>
    <loc>https://example.com/sitemap-posts.xml</loc>
  </sitemap>
</sitemapindex>

The validator follows index files one level deep — it fetches up to 20 child sitemaps and reports per-child results, so you can see exactly which shard of your index is broken. That matters because a malformed child fails quietly in the wild: the index itself parses fine, and only the pages inside that one shard go missing from the crawl.

What lastmod Should Look Like

The sitemaps protocol requires lastmod to be a W3C date: YYYY-MM-DD on its own, or a full timestamp such as 2026-01-15T10:30:00+00:00. Both are valid; what is not valid is the output of date.toString(), Unix timestamps, or US-style month/day/year strings — parsers ignore those, and you lose the signal. Also worth knowing: Google has said it uses lastmod for scheduling when it is consistently accurate. If your CMS stamps every page with the build time, that value is noise; if it stamps real content changes, it is one of the cheapest crawl-budget levers you have.

Common Google Search Console Errors

When Search Console refuses a sitemap, the reported reason usually maps to one of these fixable problems:

  • “Sitemap could not be read” — most often malformed XML: an unescaped & in a query string, an unclosed tag, or invisible control characters pasted in by a CMS plugin. Re-serialize the file rather than hand-patching it.
  • “URL not allowed” — the sitemap lives on one host but lists URLs from another, or contains URLs above the directory of the sitemap itself. Every <loc> must share the scheme, host, and path prefix of the sitemap file.
  • “Incorrect namespace” — the xmlns attribute is missing, misspelled, or points at a URL that is not the sitemaps.org 0.9 schema.
  • “Sitemap is HTML” — the server returned an error page or a redirect to the homepage with a 200 status. Fetch the sitemap URL yourself and inspect what actually comes back.
  • “Sitemap contains URLs blocked by robots.txt” — the file is valid but lists URLs your robots rules disallow, so they will never be crawled from it.

Size Limits to Validate Against

The protocol caps each sitemap file at 50,000 URLs or 50 MB uncompressed, whichever comes first. Anything larger must be split across multiple files and joined with a sitemap index. This tool validates up to 50,000 URLs per run; for raw files, remember that the 50 MB ceiling applies to the uncompressed document, and that gzip-compressed sitemaps (.gz) are not supported in this validator — serve the plain .xml file instead.

Frequently Asked Questions

Is a sitemap required for SEO?

Not strictly — sites with strong internal linking get crawled without one — but for new sites, large sites, or sites with orphaned pages, a sitemap is the fastest way to hand Google a complete URL list. It is discovery insurance, not a ranking factor.

Does an invalid sitemap hurt rankings?

An invalid sitemap does not demote you; it simply stops helping. Pages listed in a broken file may never be discovered, and Search Console coverage reports will undercount your indexed URLs. Fixing validity restores the benefit rather than removing a penalty.

Should every page be in the sitemap?

Only canonical, indexable, 200-status URLs. Exclude redirect chains, noindex pages, parameterized duplicates, and paginated archives you do not want crawled — a bloated sitemap dilutes the crawl priority of pages that matter.

How often should I resubmit my sitemap?

Resubmit after meaningful content changes or new page groups. Search engines re-fetch sitemaps on their own schedule based on how often the file changes; a static sitemap resubmitted daily gains nothing.

Can this tool validate sitemap.txt or RSS feeds?

This validator checks the XML format. Plain-text sitemaps (one URL per line) and RSS/Atom feeds are alternate formats Google accepts, but they follow different rules and are outside what this tool inspects.

Get listed on the directories that matter

A valid sitemap helps search engines find every page you publish. Pair it with our free directory database to build the backlinks that get those pages crawled faster.

Browse directoriesCreate free accountGet the extension →