A sitemap is a file that lists the important URLs on your website so search engines can discover and crawl your content more efficiently. In SEO, this usually means an XML sitemap, which can also include helpful details like when a page was last updated and how pages relate to each other. Think of it as a directory you provide to search engines so they can find the pages you want considered for indexing, especially on larger sites or sites with pages that are not easy to reach through internal links.
To keep signals accurate and clear, your sitemap should only include URLs you actually want indexed and that return the correct status code, typically a 200. Avoid listing pages that are redirected, blocked, noindex, canonicalized to a different URL, or returning errors, since that can create confusion and waste crawl resources. It is also smart to keep the sitemap updated as you publish or remove pages, and submit it through tools like Google Search Console so you can spot coverage issues faster.