Tool guideWeb & SEO Utilities

Sitemap Checker – Complete Guide to Validating XML Sitemaps and Sitemap Indexes

What the sitemaps.org protocol requires, how the NetTools.tech Sitemap Checker fetches or parses a sitemap, and how to read and fix the errors and warnings it reports.

By NetTools.tech · · 8 min read

Your sitemap says 12,000 URLs, the search console says "couldn't fetch" or "invalid date", and the generator plugin claims everything is fine. Or a relaunch left the sitemap full of http:// URLs, old staging hosts and relative paths. Sitemaps are generated by software and rarely read by humans, so their errors tend to stay unnoticed until crawling or indexing suffers.

The Sitemap Checker fetches a sitemap from a URL (or parses XML you paste), checks it against the sitemaps.org protocol, counts entries, validates every <loc>, <lastmod>, <changefreq> and <priority>, flags duplicates and cross-host URLs, and shows the entries in a filterable table plus a formatted XML preview.

What is an XML sitemap?

In simple terms

A sitemap is a machine-readable list of the pages on your site that you want search engines to know about. Instead of discovering every page by following links, a crawler can read the list. A sitemap index is a list of such lists, for sites with too many pages for one file.

Technical background

The format is defined by the sitemaps.org protocol and supported by the major search engines. A URL set looks like this:

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

Key rules:

  • The root element is <urlset> (page URLs in <url> elements) or <sitemapindex> (child sitemaps in <sitemap> elements), in the namespace http://www.sitemaps.org/schemas/sitemap/0.9.
  • Each file holds at most 50,000 entries and 50 MB uncompressed; it may be gzip-compressed.
  • <loc> is required, must be an absolute URL, at most 2,048 characters, and properly XML-escaped (& as &amp;).
  • <lastmod> uses W3C Datetime: YYYY, YYYY-MM, YYYY-MM-DD, or a date with time and time zone.
  • <changefreq> is one of always, hourly, daily, weekly, monthly, yearly, never; <priority> is a number from 0.0 to 1.0. Google ignores both.
  • A sitemap should list URLs from its own host and protocol, unless cross-host submission has been verified.

Sitemaps are discovered through a Sitemap: line in robots.txt or by submitting them in a search engine's webmaster tools.

Why use a sitemap checker?

  • Catch XML errors. A single unescaped & makes the whole file unreadable.
  • Find invalid entries. Relative URLs, missing <loc>, overly long URLs and malformed dates.
  • Spot migration leftovers. URLs on a different host or with http:// instead of https://.
  • Respect the limits. Files above 50,000 entries or 50 MB are rejected or truncated by search engines.
  • Check lastmod quality. Dates in the future or a sitemap without any lastmod reduce its usefulness for recrawling.

Who should use it?

  • SEO specialists auditing technical SEO and migrations.
  • Developers maintaining sitemap generators in a CMS, framework or static site build.
  • Site owners who received sitemap errors from a search engine and want to see the details.
  • Agencies checking client sites before and after a relaunch.

How the sitemap checker works

Paste mode works entirely in your browser. The XML is parsed with the browser's DOMParser as application/xml, which never executes anything and does not load external entities, and then analyzed.

Fetch mode uses the NetTools.tech server to download the file:

  1. The URL must be a public http or https URL on port 80, 443, 8080 or 8443, without embedded credentials. Without a scheme, https:// is assumed. Every redirect target (at most 5) is checked again.
  2. The server requests it with Accept: application/xml,text/xml, the identified NetToolsBot/1.0 user agent, no cookies and a 35-second limit for the download.
  3. Gzip, Brotli and deflate content encoding is decoded. A body that is itself a gzip file (a .xml.gz sitemap) is decompressed too. In both cases the output is capped at 50 MB; a larger sitemap is refused instead of being cut off.
  4. The decompressed XML is returned to your browser, decoded as UTF-8, for a 2xx response. For an error status, you see the status instead.
  5. The browser parses and analyzes the XML exactly as in paste mode, using the final URL after redirects as the sitemap's own address for the host and protocol checks.

Sitemap indexes are listed, not crawled recursively. URLs and content are not stored, and per-client rate limits apply.

The analysis checks, in this order: well-formed XML, a urlset or sitemapindex root, the sitemaps.org namespace, file size, entry count, missing <loc>, non-absolute URLs, URLs over 2,048 characters, duplicates, other hosts and protocols than the sitemap's, lastmod format and future dates (more than one day ahead), changefreq and priority values, and, for indexes, child URLs that do not end in .xml or .xml.gz.

How to use the NetTools.tech Sitemap Checker

  1. Open the Sitemap Checker.
  2. Choose a tab:
    • Sitemap URL: enter the address, for example https://example.com/sitemap.xml. It is usually listed in robots.txt.
    • Paste XML: paste the file into Sitemap XML, or press Load example for a sample with deliberate mistakes.
  3. Press Check sitemap.
  4. Read the summary tiles and the Validation list. Messages that concern specific entries list their numbers.
  5. Use the Filter entries box above the entries table to search URLs and dates.
  6. For a sitemap index, press Check next to a child sitemap to open it in the checker.
  7. Scroll to the XML preview for an indented view of the file, or the raw text if it is not well-formed.

The Robots.txt Checker links each Sitemap: line straight into this tool.

Understanding the results

ResultMeaningWhat to look for
TypeURL set, Index or InvalidInvalid means the XML did not parse or the root element is wrong
URLs / SitemapsNumber of entriesMore than 50,000 is an error
With lastmodShare of entries that have a lastmod0% is noted; accurate dates help recrawling
Errors / WarningsCounts from the validation listFix errors first; they can make search engines skip entries or the file
SizeUncompressed sizeAbove 50 MB is an error
Validation: not well-formedXML parser messageUnescaped &, unclosed tags, wrong encoding
Validation: namespaceMissing or wrong xmlns on the rootMust be exactly the sitemaps.org 0.9 namespace
Validation: entry errorsMissing <loc>, non-absolute URLs, URLs over 2,048 characters, invalid lastmod, changefreq or priorityEntry numbers point to the rows
Validation: warningsDuplicates, other host, other protocol, future lastmod, empty sitemapUsually generator or migration issues
Validation: infochangefreq/priority ignored by Google, no lastmod, child sitemaps without .xmlOptional improvements
Entries tableURL, Last modified, Change freq., Priority (or Sitemap URL and Check for indexes)The first 500 entries are shown
XML previewIndented XML with line numbersUp to 3,000 lines are shown

Example: a small sitemap with typical mistakes

Pressing Load example analyzes this sitemap (shown here without its XML declaration) as if it were https://www.example.com/sitemap.xml:

xml
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url><loc>https://www.example.com/</loc><lastmod>2026-10-01</lastmod><changefreq>weekly</changefreq><priority>1.0</priority></url>
  <url><loc>https://www.example.com/about/</loc><lastmod>2026-09-14T08:30:00+00:00</lastmod></url>
  <url><loc>https://www.example.com/blog/</loc><lastmod>2026-10-12</lastmod><changefreq>daily</changefreq></url>
  <url><loc>https://www.example.com/blog/first-post/</loc><lastmod>14.09.2026</lastmod></url>
  <url><loc>/contact/</loc></url>
  <url><loc>https://www.example.com/about/</loc></url>
  <url><loc>https://www.example.com/pricing/</loc><priority>1.5</priority></url>
</urlset>

The report shows Type "URL set", 7 URLs, 57% with lastmod, and:

  • Error: 1 <loc> value is not an absolute http(s) URL (entry 5).
  • Error: 1 <lastmod> value is not in W3C Datetime format (entry 4).
  • Error: 1 <priority> value is outside 0.0–1.0 (entry 7).
  • Warning: 1 duplicate <loc> entry (entry 6).
  • Info: Google ignores <changefreq> and <priority>.

Fixes: write /contact/ as https://www.example.com/contact/, use 2026-09-14 for the date, remove the duplicate /about/ entry and drop or correct the priority.

Common use cases

  • After a migration: confirm that all URLs use the new host and https://.
  • Search console errors: reproduce "invalid date", "invalid URL" or "couldn't read" messages with entry numbers.
  • Generator changes: check the output after updating a CMS plugin or build script.
  • Large sites: verify that a sitemap index lists all child sitemaps and each stays below the limits.
  • Drafts: paste a hand-written sitemap before uploading it.

Troubleshooting

"The XML is not well-formed"

The parser message names the problem. The most common cause is an unescaped & in a URL with query parameters; write it as &amp;. Byte order marks or text before <?xml and invalid characters from copy-paste also break parsing.

"The root element is <html>"

The URL returned a web page, often a CMS 404 page or a login screen, instead of XML. Check the address and that the sitemap route is enabled.

HTTP 404, 403 or another error status

The server did not deliver a sitemap. 403 often comes from bot protection that blocks automated requests; paste the XML from your browser instead.

"URLs are on a different host than the sitemap"

Entries on example.com in a sitemap on www.example.com (or the other way round) count as cross-host. Generate URLs with the canonical host, or verify both hosts with the search engine.

"Missing or wrong namespace"

Use xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" exactly, on the root element. https:// in the namespace, or a missing namespace, is wrong.

The sitemap is refused as too large

The uncompressed size exceeds 50 MB. Split it into several files and list them in a sitemap index.

Common mistakes

  • Listing URLs that are not meant to be indexed: redirects, 404s, noindex pages or non-canonical variants send mixed signals.
  • Setting lastmod to the generation time on every build. Search engines learn to ignore lastmod that is always "now".
  • Relying on priority and changefreq. Google ignores them.
  • Using relative URLs in <loc>.
  • Blocking the sitemap in robots.txt, or blocking the URLs it lists.
  • Forgetting to update the sitemap after removing or moving sections.

Limitations

  • The checker validates structure and values; it does not request the listed URLs. Use the Broken Link Checker or HTTP Status to check whether entries answer 200.
  • Sitemap indexes are not crawled recursively; check each child sitemap separately.
  • The entries table shows the first 500 entries and the XML preview the first 3,000 lines; the validation covers all entries.
  • Fetched sitemaps are decoded as UTF-8. Image, video and news sitemap extensions are not validated beyond the core <loc> and <lastmod> fields.
  • Fetch mode only reaches public hosts on ports 80, 443, 8080 and 8443, from one server location with the NetToolsBot user agent.
  • Passing the checker does not mean search engines will index the URLs; that depends on content, canonicals and many other signals.

Security & privacy

In paste mode the XML stays in your browser and is parsed without executing anything or loading external resources. In fetch mode the sitemap URL is sent to the NetTools.tech server, which downloads the file and returns it to your browser; the URL and content are not stored. The target website sees a request from our server's IP address with the NetToolsBot user agent. Sitemaps are usually public, but avoid pasting files that list private or unreleased URLs into any online tool if that is a concern.

Summary

An XML sitemap lists the URLs you want crawled in the sitemaps.org format, within limits of 50,000 entries and 50 MB per file. The NetTools.tech Sitemap Checker fetches a sitemap (including .xml.gz) or parses pasted XML in your browser, and reports structural errors, invalid URLs and dates, duplicates and cross-host entries with their entry numbers. It checks the file, not the pages it lists, so combine it with link and status checks.

Frequently asked questions

What is an XML sitemap?

It is an XML file in the sitemaps.org format that lists URLs you want search engines to crawl, optionally with the date each page last changed. It helps crawlers discover pages, especially on large or new sites, but it does not guarantee that they are indexed.

How many URLs can a sitemap contain?

At most 50,000 URLs and 50 MB uncompressed per file. Larger sites split their URLs across several sitemaps and list those in a sitemap index.

What is a sitemap index?

A sitemap index is a file with a sitemapindex root element that lists other sitemap files instead of pages. The checker shows its child sitemaps with a Check link for each, but does not crawl them automatically.

Do priority and changefreq matter?

Google ignores both. lastmod is used when it is consistently accurate, so update it only when the page content really changes; the checker notes priority and changefreq as information only.

Which date format does lastmod need?

W3C Datetime, a profile of ISO 8601: for example 2026-10-13 or 2026-10-13T09:30:00+00:00. Formats such as 13.10.2026 or 10/13/2026 are reported as errors.

Can a sitemap list URLs on another domain?

Normally a sitemap lists URLs of its own host. Cross-host entries are accepted by search engines only when you have proven ownership of both, for example through robots.txt or the search engine's webmaster tools, so the checker warns about them.

Does the checker support .xml.gz sitemaps?

Yes. In fetch mode the server decompresses gzip-compressed sitemaps, whether they are served as a .gz file or with gzip content encoding, up to the 50 MB uncompressed limit.