Understand XML sitemaps, which URLs belong in them, how to submit them in Search Console and how to diagnose common errors.
What an XML sitemap does
An XML sitemap is a machine-readable list of URLs you want search engines to discover. It can help crawlers find important pages, especially on large or frequently updated sites. A sitemap is a discovery hint, not a command to index a page or a guarantee that Google will rank it.
Include canonical, indexable URLs
List the preferred HTTPS URLs that return a successful response and are intended to appear in search. Avoid redirects, 404 pages, blocked URLs and pages marked noindex. When a page has multiple URL versions, use the canonical version consistently in the sitemap and internal links.
Keep metadata accurate
The optional lastmod value should reflect a meaningful content change, not an automatic daily timestamp change when nothing changed. Search engines may ignore changefreq and priority hints. A small, trustworthy sitemap is more useful than one padded with duplicate or obsolete URLs. For more detail on this related topic, see Mobile-First Indexing: What Website Owners Must Check.
Find and submit the sitemap
Common locations include /sitemap.xml and a sitemap index produced by a CMS. Open the sitemap URL in a browser, check it returns HTTP 200 and confirm the XML is valid. Submit the full sitemap URL in Google Search Console under Sitemaps. Submission does not replace accessible internal navigation.
Troubleshoot sitemap errors methodically
If Search Console reports it cannot fetch a sitemap, test the URL directly, inspect server responses and review redirects, authentication, firewall challenges and malformed XML. Verify that Googlebot can access the file and that the sitemap URL is not accidentally blocked. Compare the live response with what your hosting logs show.
Audit sitemap URLs after migrations
After changing slugs or moving domains, update the sitemap to final URLs and maintain 301 redirects from old addresses. Check that canonical tags agree with the sitemap. Use the indexing troubleshooting guide if pages remain excluded despite successful sitemap submission.