hackerdb

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

  1. Paste your URLs. Full URLs, or paths starting with / if you set the base.
  2. Optionally set lastmod. Use a date only if it is accurate for these pages.
  3. Copy or download. Save as sitemap.xml at your site root.
  4. 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

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

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&amp;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

All free tools