TL;DR
- 01Relative URLs in loc are the most common sitemap error. - Always absolute. Always HTTPS. Always match the canonical host.
- 02Wrong lastmod format damages trust. - Google can ignore the whole file's freshness signal when dates are malformed.
- 03Oversized sitemaps are rejected wholesale. - Split anything over 50MB or 50,000 URLs into a sitemap index.
- 04404s and redirects waste crawl budget. - Every sitemap URL should return 200 and be indexable.
- 05Validate, deploy, then resubmit. - Search Console usually re-crawls corrected sitemaps within 24 hours.
What the audit checks first
A useful sitemap audit separates parser failures from URL failures. Otherwise teams fix the XML and miss the URLs Google still cannot use.
What counts as an invalid sitemap
Sitemap validation fails at three layers: XML syntax like malformed tags, URL validity like relative paths or wrong protocols, and policy limits like file size or URL count.
Search Console catches many syntax and URL errors. Policy failures can be quieter: the file parses, but a subset of URLs gets dropped.
URL format
HTTP status
Freshness
File limits
| Dimension | Valid sitemap | Invalid sitemap |
|---|---|---|
| URL format | Absolute HTTPS canonical URL | Relative URL, wrong host, or mixed protocol |
| HTTP status | 200 OK and indexable | 404, redirect chain, blocked, or noindex |
| Freshness | Valid W3C lastmod when trustworthy | Human date, slashed date, or stale generated value |
| File limits | Under 50MB and 50,000 URLs | Oversized file without a sitemap index |
The 5-step fix
Work top to bottom. Stop when your validator passes.
- 01
Validate the raw XML
Paste the sitemap into an XML validator. Look for unclosed tags, missing namespace declarations, and stray characters before the XML declaration. - 02
Make every loc an absolute HTTPS URL
Relative URLs are invalid. The host must also match your canonical domain. - 03
Fix lastmod to W3C datetime format
Use dates like 2026-04-18 or 2026-04-18T10:30:00+00:00. Avoid slashes and human-readable date strings. - 04
Remove 404s, redirects, and noindex URLs
Every sitemap URL should return 200 OK and be indexable. Redirects, 404s, and noindex pages send weak or contradictory signals. - 05
Split large files
Sitemaps have hard limits: 50MB uncompressed and 50,000 URLs. Over either limit, use a sitemap index.
<?xml version="1.0" encoding="UTF-8"?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <url> <loc>https://berelevant.ai/</loc> <lastmod>2026-04-18T10:30:00+00:00</lastmod> </url> </urlset>
After you deploy the fix
Resubmit the corrected sitemap in Google Search Console. Google usually re-crawls within 24 hours; index effects take longer. Watch submitted URLs versus indexed URLs. If those numbers do not converge, the problem is usually at the URL level, not in the sitemap file.
The thing nobody tells you about sitemap audits
Most sitemap issues are not in the sitemap. They are in the CMS logic that generates it. A sitemap that looks fine today can break again when a migration rewrites URLs or a new content type is added.
The durable fix is a check that runs on every deploy.
Deploy-time sitemap audit
best durable fixRun the sitemap check every time content generation or routing changes. The failure happens before broken URLs reach production.
FAQ
How do I find my sitemap URL if I do not know it?
Does fixing a sitemap recover lost rankings?
Should I include every URL in my sitemap?
Does changefreq or priority matter?
Can I have multiple sitemaps?
Related reading
robots.txt, sitemap.xml, and noindex - which wins?
A precedence table and common misconfigurations.
Canonical tags: when they help, when they hurt
The wrong-canonical trap that silently drops pages.
HTTP status codes Google actually cares about
200, 301, 302, 404, 410, 503, and the soft-404 trap.
Fix the site-wide constraints.
We find and fix the technical constraints suppressing organic traffic and AI citations across large websites.