Submitting a sitemap feels like the end of the job: the file is generated, uploaded and handed to the search engines. But a file that was never checked can carry a malformed entry or a date in a regional format. It can also carry a quiet breach of the protocol limits. Engines may reject entries, or the whole file, without telling you clearly. The failure surfaces later, as pages that are slow to be crawled or never appear.
This guide shows how to validate a sitemap before submitting it, using the free Sitemap Validator on Ovatly. You will see what a valid file actually requires and how errors differ from warnings. You will also see why the last check has to run on the published copy rather than your local one. Everything runs in your browser: the XML you paste is parsed on your device and never uploaded.
Contents
- Quick answer
- What a valid sitemap needs
- Errors versus warnings
- How to validate a sitemap, step by step
- Worked example: a European date and a bad priority
- Validating a sitemap index file
- Limitations and alternatives
- Common mistakes
- FAQs
- Conclusion
Quick answer
To validate a sitemap before submitting it, paste the full sitemap.xml content into the Sitemap Validator. Read the summary (file type, entry count, size and error count), fix the errors first, then review the warnings. Then re-paste the corrected file to confirm it is clean. If the file is a sitemap index, run each child sitemap it lists through the same check. Then upload the corrected file, and paste the published copy's contents once more. The validator checks the text you paste, not the file live on your server. Only submit once that final check comes back clean.
What a valid sitemap needs
The requirements are few and specific. A valid sitemap needs well-formed XML, the sitemap namespace declared on the root element, and an absolute URL in every entry's <loc> element. It also needs W3C-format dates wherever <lastmod> is used, and no more than 50,000 URLs or 50 MB uncompressed in a single file.
The namespace deserves a sentence of its own. The <urlset> element should declare xmlns="http://www.sitemaps.org/schemas/sitemap/0.9". Without it, strict parsers and some search engines will not recognise the file as a sitemap at all. The validator parses the XML with the browser's DOMParser. It checks both <urlset> files and sitemap index files, including the namespaced variants produced by common CMS plugins. So the file your generator produced is the file it can check.
Errors versus warnings
Errors break the format or the protocol, and they are the findings that can make engines ignore entries or the whole file. The validator's error list covers malformed XML, a missing or invalid URL in an entry, and <lastmod> dates in the wrong format. It also covers breaches of the protocol limits on URL count and file size.
Warnings are softer problems that engines usually tolerate but you should still fix. Duplicate entries and a <priority> outside the 0.0 to 1.0 range are the ones seen most often. Tolerated is not the same as harmless. A duplicate is a page listed twice, and an out-of-range priority is a value no reader can interpret as intended. The working order the tool itself suggests is the right one. Fix the errors first, then review the warnings. Only call the file done when both lists are empty.
How to validate a sitemap, step by step
- Paste the full sitemap.xml content into the Sitemap Validator.
- Read the summary: file type, entry count, size and error count.
- Fix the errors first, then review the warnings.
- Re-paste the corrected file to confirm it is clean.
- If the file is a sitemap index, run each child sitemap it lists through the same check.
- Upload the corrected file to your server, then paste the published copy's contents into the validator one last time before you submit.
Worked example: a European date and a bad priority
Consider a sitemap whose first entry has <lastmod>31-01-2026</lastmod>. It fails with the error: "URL entry 1 has an invalid <lastmod> value". Sitemap dates must be in W3C format, year first: 2026-01-31. Regional orders like day-month-year are one of the most common errors this check catches. The file looks perfectly reasonable to a human reader in the country that produced it.
The same file with a <priority> of 1.5 would add a warning, because priority must stay between 0.0 and 1.0. That pairing is typical of a real pre-submission check. It pairs one hard error that would cost the entry its date with one soft warning that costs nothing to correct. Fix the date to 2026-01-31, bring the priority into range, and re-paste the whole file. Then confirm the error count is zero and the warnings are gone before the file goes anywhere near a search engine.
Validating a sitemap index file
Large sites split their sitemaps, and a sitemap index ties the pieces together. The validator handles these too. Index files are detected by their <sitemapindex> root. Each child <sitemap> entry's <loc> and <lastmod> are checked the same way as entries in a regular file.
A clean index, though, only proves the index is sound. The protocol limits apply per file, and the errors that matter usually live in the children. So run each child sitemap the index lists through the same check. Submitting an index whose children were never validated is the large-site version of submitting an unchecked file.
Limitations and alternatives
A clean validation means the file is well-formed and consistent; it cannot tell you whether the listed pages themselves are indexable or worth crawling. If your sitemap passes and pages are still not indexed, validation has done its part. The problem sits elsewhere: indexing also depends on the pages being crawlable, canonical and valuable enough to include. So check robots rules and page quality next.
The other limit is built into how the tool works. The validator checks the text you paste, not the file live on your server. So a clean result on a local draft proves nothing about the copy engines will fetch. After fixing errors, upload the corrected file and paste its contents once more to confirm the published copy is clean. For the related job of hunting down stale entries after a site move, the SEO Tools guides cover the audit side of sitemap maintenance.
Common mistakes
- Submitting the first file a generator produces. Generators output whatever they are given; validation is the step that catches what they got wrong.
- Fixing errors and ignoring warnings. Duplicates and out-of-range priorities are quick to correct and pointless to ship.
- Checking the draft instead of the published file. Upload the corrected file, then paste its actual contents for the final check.
- Validating an index and skipping its children. Each child sitemap needs the same check; that is where most errors live.
- Assuming a pass means pages will be indexed. Validation covers the file only, not the crawlability or quality of the pages it lists.
FAQs
What is the difference between an error and a warning here? Errors break the format or the protocol (malformed XML, missing loc, invalid dates, oversized files). They can make engines ignore entries or the whole file. Warnings are problems like duplicates or out-of-range priorities that engines usually tolerate but you should still fix.
Why does my file need the sitemap namespace?
The urlset element should declare xmlns="http://www.sitemaps.org/schemas/sitemap/0.9". Without it, strict parsers and some search engines will not recognise the file as a sitemap.
Can this validate a sitemap index file?
Yes. Index files are detected by their <sitemapindex> root, and each child <sitemap> entry's loc and lastmod are checked the same way.
What does a valid sitemap need? Well-formed XML, the sitemap namespace declared on the root element, and an absolute URL in every entry's loc element. It also needs W3C-format dates wherever lastmod is used, and no more than 50,000 URLs or 50 MB uncompressed in a single file.
Is a sitemap validator the same as a sitemap checker? In practice, yes. Both names describe checking a sitemap file for errors before search engines rely on it. This tool validates the XML structure and the protocol rules of the file you paste, which is the check most people mean by either name.
Conclusion
Validating before you submit costs a few minutes. It removes a whole class of silent failures: malformed XML, missing URLs, wrongly formatted dates and files past the protocol limits. Run the check, fix errors before warnings, and validate every child of an index file. Make the final pass on the published copy rather than the draft. An audit may turn up stale entries instead of format errors. The companion guide How to Check a Sitemap for Redirects and 404 URLs covers that side of the job.