Home / Free tools / sitemap.xml generator
sitemap.xml generator from a list of URLs
Paste your URLs, one per line, and get a valid sitemap.xml plus the matching robots.txt line. The tool escapes characters, removes duplicates and flags mixed hosts and size limits.
How to use it
- Paste your URLs. Full URLs, or paths starting with / if you set the base.
- Optionally set lastmod. Use a date only if it is accurate for these pages.
- Copy or download. Save as sitemap.xml at your site root.
- Reference it. Add the Sitemap line to robots.txt and submit it in the search consoles.
What a sitemap is for
A sitemap is a list of the canonical URLs you want crawled. It does not force indexing, but it helps crawlers discover new pages and, with honest lastmod dates, tells them what changed. For a small site with good internal links it matters less; for a site with many pages, new content or weak links it matters more.
Rules the generator enforces
- One host. A sitemap may list only URLs on the host where it lives. Mixed hosts and mixed http and https are skipped with a message.
- Escaped characters. An ampersand in a query string must be written
&in XML. A raw one makes the file invalid. - No duplicates. The same URL listed twice wastes crawl effort.
- Limits. 50,000 URLs or 50 MB uncompressed per file.
Only list URLs you want indexed
Leave out redirects, noindexed pages, parameter variations and anything blocked in robots.txt. A sitemap full of such URLs sends mixed signals. Our own sitemap is a live example. After publishing, reference it from robots.txt (the robots.txt generator adds the line) and verify with the page checker.
Worked example
This is what the tool produces for the sample input, so you can see the result without running it.
Input
/ /a?x=1&y=2 https://example.com/b/ https://other.example/c /a?x=1&y=2 http://example.com/d
Result
3 URL(s) in the sitemap.
Add this line to robots.txt: Sitemap: https://example.com/sitemap.xml
- Skipped (different host or scheme than the first URL, a sitemap may only list URLs of one host): https://other.example/c
- Duplicate removed: https://example.com/a?x=1&y=2
- Skipped (different host or scheme than the first URL, a sitemap may only list URLs of one host): http://example.com/d
Only set lastmod when it is true; search engines learn to ignore dates that are always today. changefreq and priority are omitted on purpose: major engines ignore them.
Output
<?xml version="1.0" encoding="UTF-8"?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <url><loc>https://example.com/</loc><lastmod>2026-12-01</lastmod></url> <url><loc>https://example.com/a?x=1&y=2</loc><lastmod>2026-12-01</lastmod></url> <url><loc>https://example.com/b</loc><lastmod>2026-12-01</lastmod></url> </urlset>
Frequently asked questions
Do I need a sitemap?
Small, well-linked sites can be crawled without one, but it is cheap to provide and helps discovery and change signals.
Why no changefreq or priority?
Google and other major engines ignore them, so they only add noise.
Should lastmod always be today?
No. Only update it when the page content really changed; engines discount dates that are always new.
Where do I put sitemap.xml?
At your domain root and reference it in robots.txt with a Sitemap: line.
More free tools
- robots.txt generator for AI crawlers: Generate a robots.txt that allows AI search bots, blocks AI training bots, or blocks all AI crawlers, with private paths repeated in every named group.
- llms.txt generator: Generate a valid llms.txt: site name, one-sentence summary and grouped links with short notes. Free, runs in your browser, with an honest note on what it does.
- Title and meta description length checker: Check title and meta description length in characters and estimated pixels, with a search result preview and plain-language fixes. Free and private.