What a sitemap is for
An XML sitemap is a list of the URLs you want search engines to know about. It does not make pages rank, and it does not force anything into the index, but it helps crawlers find pages faster, especially on new sites with few links, large sites, and pages buried deep in the navigation.
What to include
- Only canonical, indexable pages. The version of each URL you want in search, returning 200, not blocked by robots.txt, not set to noindex.
- Absolute URLs on one host.
https://example.com/pricing, not/pricing. A sitemap on example.com should not list URLs on another domain. - No fragments or session parameters.
#sectionis ignored by crawlers and tracking parameters create duplicates.
The optional tags
- lastmod is the one Google uses, but only if it is consistently accurate. Setting every page to today on every build teaches Google to ignore it.
- changefreq and priority are ignored by Google. Bing reads them lightly. Leaving them out keeps the file smaller and honest.
Limits and large sites
A single sitemap holds at most 50,000 URLs and 50 MB uncompressed. Past that, this tool writes sitemap-1.xml, sitemap-2.xml and so on, plus a sitemap.xml index that lists them. Upload them all to the root of your site and submit only the index.
Special characters are escaped for you: an & in a URL becomes &, which is the most common reason hand-written sitemaps fail to parse.
After you upload
Add Sitemap: https://example.com/sitemap.xml to your robots.txt (the robots.txt generator does this), submit it in Google Search Console and Bing Webmaster Tools, and run it through the sitemap checker. Already have a sitemap and need the list back? Use the sitemap URL extractor.