How to use the sitemap generator
- Paste your page URLs, one per line. They must be absolute (
https://…). - Optionally set a last-modified date, or press Use today.
- Leave changefreq and priority out unless another search engine you care about uses them.
- Check the results: skipped lines, removed duplicates and host warnings.
- Download
sitemap.xml, upload it to your site root and submit it.
For sites with several sitemaps, turn on Sitemap index, paste the URLs of the sitemap files, and download sitemap_index.xml.
How the sitemap is built
Each valid URL is normalised by the browser’s URL parser (lower-case host, encoded spaces), checked for duplicates, and written as:
<url>
<loc>https://www.example.com/blog/</loc>
<lastmod>2026-10-05</lastmod>
</url>
inside a <urlset> element with the sitemaps.org namespace. Characters with special meaning in XML (&, <, >, quotes) are escaped, so a URL like ?a=1&b=2 becomes ?a=1&b=2, which is a common cause of invalid sitemaps. The file starts with an XML declaration and uses UTF-8.
Worked examples
Example 1: a small site
Load the sample: five pages, one duplicate and one relative path. The result contains five unique URLs. The duplicate /about/ is removed and /relative-page/ is listed as skipped, because sitemaps need absolute URLs.
Example 2: www and non-www mixed
Paste URLs from example.com and www.example.com together. The checks report two hosts. A sitemap should only list URLs on its own host, in the canonical form you use everywhere else. Pick one host and use it consistently in redirects, canonical tags and the sitemap.
Example 3: a large shop
A shop with 120,000 product URLs needs three sitemaps (for example by category), each under 50,000 URLs. Generate each one, upload them, then switch to Sitemap index, paste the three file URLs and upload the index. Submit only the index in Search Console.
After generating
- Upload the file to the root of your site, such as
https://www.example.com/sitemap.xml. - Reference it in robots.txt with a
Sitemap:line. - Submit it in Google Search Console and Bing Webmaster Tools, and watch the reports for errors.
- Keep it current. Most content management systems and static site generators can create sitemaps automatically, which is better than updating a file by hand.
Common mistakes
- Listing URLs that redirect or are noindexed, which sends search engines mixed signals.
- Setting lastmod to today on every build, which makes the date meaningless.
- Including tracking parameters, which creates duplicates of the same page.
- Unescaped ampersands, which make the XML invalid.