XML Sitemap SEO: Complete Guide
Learn what XML sitemaps do, which URLs belong in them, common sitemap errors, and how to keep your sitemap useful for search engines.
What Is an XML Sitemap?
An XML sitemap is a machine-readable file that lists URLs you want search engines to discover. It is especially useful for large websites, frequently updated websites, and sites where some pages are difficult to discover through internal links.
Which URLs Should Be Included?
Focus on canonical, indexable URLs that provide useful content. Avoid filling the sitemap with URLs that redirect, return errors, are blocked, or are intentionally excluded from indexing.
Common Sitemap Problems
- 404 URLs inside the sitemap.
- Redirected URLs.
- Duplicate URL variants.
- Non-canonical URLs.
- Incorrect HTTP/HTTPS versions.
- Outdated URLs after site migrations.
Sitemap and robots.txt
It is common to reference the XML sitemap from robots.txt. Keep the sitemap URL correct and accessible.
Sitemaps Do Not Guarantee Indexing
Submitting a URL in a sitemap does not guarantee that a search engine will index it. The page still needs to be accessible, useful, and eligible for indexing.
Combine sitemap checks with our robots.txt guide and technical SEO audit checklist.
Conclusion
A clean sitemap is simple: list the important canonical URLs you want search engines to discover and keep the file updated as your website changes.