Sitemap best practices
Only indexable pages
No redirects, 404s or noindex pages.
Use https
Match the version Google should index.
Accurate lastmod
Only change it when content really changes.
List it in robots.txt
Add a Sitemap line so crawlers find it.
Frequently asked questions
What does the sitemap validator check?
That the file is valid XML, the number of URLs, size limits, duplicates, http vs https, URLs on other domains, and whether lastmod dates are valid and fresh.
What is a sitemap index?
A sitemap that lists other sitemaps. WordPress SEO plugins like Yoast create one at /sitemap_index.xml. Click any child sitemap in the results to check it.
How many URLs can a sitemap have?
Up to 50,000 URLs and 50 MB uncompressed. Larger sites need several sitemaps listed in an index.
Where do I submit my sitemap?
In Google Search Console under Sitemaps, in Bing Webmaster Tools, and in your robots.txt with a Sitemap line.