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.
Inspects and validates XML sitemaps for protocol compliance, URL limits, lastmod timestamps, and canonical tags.
—Inspects and validates XML sitemaps for protocol compliance, URL limits, lastmod timestamps, and canonical tags.
<?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>
Status: VALID · URLs Found: 1 · Protocol: Sitemaps XML 0.9
Validates schema declaration and absolute HTTPS loc URLs.
Confirmation that search engine crawlers can successfully parse and discover your site architecture.
Your input is sent to YAS infrastructure because the tool requires server-side processing or public network queries. Input is not stored.
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>"}'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();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()| Field | Type | Required | Description |
|---|---|---|---|
| input | string | Yes | XML sitemap text |
{ "slug": "sitemap-validator", "valid": true, "urlCount": 1 }Inspect and validate XML sitemaps for schema compliance and URLs.
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).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.
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.
Generators silently emit staging hostnames, relative URLs or an empty urlset when a data source fails. Validating in CI catches it before deployment.
Crossing 50,000 URLs requires an index file. Validating both the index and its children confirms the split is well-formed.
Sitemaps accumulate retired sections. Reviewing the list often reveals thousands of URLs you no longer want crawled.
What this tool deliberately does not do, and where it will disagree with other implementations.