What a sitemap validator checks
- Structure: valid XML, a
<urlset>or<sitemapindex>root, the standard namespace and a closing tag. - Limits: no more than 50,000 URLs or 50 MB (uncompressed) per file.
- URLs: absolute http(s) URLs under 2,048 characters, no duplicates, all on the sitemap's own host, one protocol.
- Optional fields:
<lastmod>in W3C date format,<priority>between 0 and 1, valid<changefreq>values. - Reality check: a random sample of listed URLs is requested to catch 404s and server errors.
How to find a website's sitemap
Try these in order: the /robots.txt file (look for Sitemap: lines), /sitemap.xml, /sitemap_index.xml, and platform defaults such as /wp-sitemap.xml on WordPress. In Google Search Console, the Sitemaps report lists every sitemap submitted for your property. This tool runs the first three lookups automatically when you enter just a domain.
Common sitemap errors and fixes
The sitemap returns HTML instead of XML
Usually a redirect to a login page, a 404 page served with status 200 or a caching layer. Open the URL in a browser and confirm it displays XML.
URLs on a different host
A sitemap on www.example.com can't list example.com URLs. Align the host (and protocol) with your canonical version.
Broken or redirecting URLs
List only canonical, indexable URLs that return 200. Remove redirected, noindexed and deleted pages, or crawlers waste time on them.
Over the size limit
Split the file and reference the parts from a sitemap index. Many CMS plugins do this automatically.
After your sitemap is valid
A clean sitemap helps discovery, but it doesn't make pages rank. Next, see which pages actually get impressions and where small changes would win clicks. Search Console keyword research and the striking distance keywords tool are good places to start.