Skip to content
YAS.SH
Network & DNS🌐 YAS server-sideAPI availableintermediate

XML Sitemap Validator

Inspects and validates XML sitemaps for protocol compliance, URL limits, lastmod timestamps, and canonical tags.

Processed by YAS · not stored
Ready to runInstant execution
All tools →
Result

What does this tool do?

Inspects and validates XML sitemaps for protocol compliance, URL limits, lastmod timestamps, and canonical tags.

Why would I use it?

  • You want search engines (Google, Bing) to index all your website pages without crawling errors.
  • You need to ensure your sitemap does not exceed the 50,000 URL / 50MB protocol ceiling.
  • You are auditing SEO technical health before launching a major website migration.

Real-life example

Input
<?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-08-16</lastmod></url></urlset>
Output
Status: VALID · URLs Found: 1 · Protocol: Sitemaps XML 0.9

Validates schema declaration and absolute HTTPS loc URLs.

Input → Process → Output → Next

Input
Paste XML sitemap markup.
Process
Validates XML syntax, extracts <loc> URLs, checks date formats, and counts entries.
Output
Validation status, URL count, and listing of any invalid entries.
Next action
Submit the sitemap in Google Search Console and Bing Webmaster Tools.

Common mistakes

  • Using relative URLs in <loc> instead of absolute HTTPS URLs.
  • Using invalid date formats in <lastmod> (must be W3C Datetime format e.g. YYYY-MM-DD).
  • Exceeding 50,000 URLs in a single sitemap without using a sitemap index file.

What the result means

Confirmation that search engine crawlers can successfully parse and discover your site architecture.

Privacy & security

Your input is sent to YAS infrastructure because the tool requires server-side processing or public network queries. Input is not stored.

API

Endpoint
POST https://yas.sh/api/v1/tools/sitemap-validator
Request Header
Content-Type: application/json
cURL
curl -X POST "https://yas.sh/api/v1/tools/sitemap-validator" \
  -H "Content-Type: application/json" \
  -d '{"input":"<urlset><url><loc>https://example.com/</loc></url></urlset>"}'
JavaScript
const res = await fetch("https://yas.sh/api/v1/tools/sitemap-validator", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
  "input": "<urlset><url><loc>https://example.com/</loc></url></urlset>"
}),
});
const data = await res.json();
Python
import requests

r = requests.post("https://yas.sh/api/v1/tools/sitemap-validator", json={"input":"<urlset><url><loc>https://example.com/</loc></url></urlset>"})
data = r.json()
FieldTypeRequiredDescription
inputstringYesXML sitemap text
Success response
{ "slug": "sitemap-validator", "valid": true, "urlCount": 1 }

Inspect and validate XML sitemaps for schema compliance and URLs.

Error responses
  • 400 VALIDATION_ERROR — invalid input or unsupported option.
  • 413 PAYLOAD_TOO_LARGE — input exceeds the 64 KB limit.
  • 429 RATE_LIMIT_EXCEEDED — rate limit exceeded (60 req/min).
Limits
  • Maximum input: 64 KB per request.
  • Rate limit: 60 requests/min per IP address.
  • Authenticated accounts benefit from higher tier quotas.

XML Sitemap Validator: technical reference, use cases and FAQ

How XML Sitemap Validator works

An XML sitemap lists URLs for crawler discovery, conforming to the sitemaps.org schema: a urlset root with url children, each containing a loc and optionally lastmod, changefreq and priority. A sitemap index instead contains sitemap entries pointing at further sitemap files. Validation checks the namespace, element structure, URL escaping and the protocol limits — 50,000 URLs and 50 MB uncompressed per file.

Beyond schema conformance, the useful checks are semantic. Every loc must be an absolute URL on the same origin as the sitemap, lastmod must be a valid W3C datetime, and the URLs should be canonical, indexable and return 200. A sitemap full of redirects, 404s or noindexed URLs wastes crawl budget and signals low quality — Google treats changefreq and priority as effectively ignored, while lastmod is used when it is demonstrably accurate.

When to use it: real-world scenarios

Diagnosing 'couldn't fetch' in Search Console

The cause is usually a content-type that is not XML, a gzip served without the right encoding header, or unescaped ampersands in URLs — all visible on validation.

Checking a generated sitemap after a build change

Generators silently emit staging hostnames, relative URLs or an empty urlset when a data source fails. Validating in CI catches it before deployment.

Splitting a large sitemap correctly

Crossing 50,000 URLs requires an index file. Validating both the index and its children confirms the split is well-formed.

Auditing which URLs you are actually submitting

Sitemaps accumulate retired sections. Reviewing the list often reveals thousands of URLs you no longer want crawled.

Pro tips

  • Escape ampersands in URLs as &amp;. A raw & makes the XML malformed and the whole file unreadable, not just that entry.
  • Only list canonical, indexable, 200-returning URLs. Including redirects and noindexed pages sends contradictory signals and wastes crawl budget.
  • Make lastmod accurate. A file where every entry claims today's date is ignored; an accurate one genuinely influences recrawl scheduling.
  • Reference the sitemap from robots.txt as well as submitting it in Search Console — the two discovery paths are independent.

Limitations and edge cases

What this tool deliberately does not do, and where it will disagree with other implementations.

  • Structure and URL syntax are validated; whether each listed URL returns 200 requires fetching them all, which is out of scope here.
  • Image, video and news sitemap extensions have additional required elements that a general validator does not fully check.
  • Gzipped sitemaps must be served with the correct encoding headers, which can only be verified against the live URL.
  • Passing validation does not mean the URLs will be indexed — that depends on content quality and crawl budget.

Frequently asked questions

How many URLs can one sitemap contain?
50,000 URLs and 50 MB uncompressed. Beyond either limit, split the file and reference the parts from a sitemap index, which itself may list up to 50,000 sitemaps.
Do changefreq and priority matter?
Google has stated it ignores both. lastmod is used when it is consistently accurate, so invest effort there and leave the other two out.
Why does Search Console say my sitemap could not be fetched?
Commonly a wrong content type, gzip without the matching Content-Encoding header, a robots.txt rule blocking the sitemap path, or malformed XML from unescaped ampersands.
Should I include noindexed pages?
No. A sitemap says 'please crawl this'; a noindex says 'do not index it'. Listing both wastes crawl budget and sends contradictory instructions.
Ask YAS AI
🍪 Cookies & privacy. Essential cookies keep you signed in and remember language and theme. Google AdSense and reCAPTCHA are Google technologies: AdSense runs only after Accept All; reCAPTCHA loads on sign-in and contact forms. See how Google uses data: https://policies.google.com/technologies/partner-sites cookie policy · privacy policy.
Settings