Sitemap: why and how to create one
How the generator works
The tool crawls the site via internal links, collects the accessible pages and builds a valid sitemap.xml under the sitemaps.org protocol — with loc and lastmod.
Upload the resulting file to the site root and reference it in robots.txt. For CMS-based sites, dynamic generation by the platform is preferable.
Sitemap and indexing
A sitemap does not guarantee indexing but noticeably speeds it up: the crawler immediately gets a list of URLs instead of gradually following links. This is especially important for new pages and large catalogs.
Watch the reports in the webmaster panels: a discrepancy between “pages in sitemap” and “pages in index” points to quality problems or technical errors.