HandyBench

XML Sitemap Generator

Turn a URL list into a valid sitemap.xml.

Leave last modified empty unless the date is real: it is applied to every URL, and Google ignores lastmod values it finds unreliable.

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://example.com/</loc>
    <changefreq>weekly</changefreq>
    <priority>0.8</priority>
  </url>
  <url>
    <loc>https://example.com/about</loc>
    <changefreq>weekly</changefreq>
    <priority>0.8</priority>
  </url>
  <url>
    <loc>https://example.com/blog</loc>
    <changefreq>weekly</changefreq>
    <priority>0.8</priority>
  </url>
</urlset>

Upload sitemap.xml to your site root and reference it in robots.txt. One sitemap holds up to 50,000 URLs; a host with more is split automatically with a sitemap index, and a list that spans several hosts gets one file per host.

How to use the XML Sitemap Generator

  1. 1 Paste your page URLs, one per line.
  2. 2 Choose a change frequency and priority (applied to every URL, or omit them), and fill in a last-modified date only if it is accurate.
  3. 3 Copy or download the generated sitemap.xml. If your list spans several hosts you get one file per host, which you can preview from the file list or download all together.
  4. 4 Upload it to your site root and add it to robots.txt.

What the tool builds

A sitemap is an XML file, defined by the sitemaps.org protocol, that lists URLs you want search engines to discover. Paste one URL per line and the generator wraps each one in a <url> element inside a <urlset> declared with the http://www.sitemaps.org/schemas/sitemap/0.9 namespace. Only valid http:// or https:// URLs are kept; any other line is skipped and listed in a warning, repeated URLs are written once with a note saying how many were removed, and the heading shows how many URLs made it in. Each URL is written in its normalised form, so spaces and non-ASCII characters are percent-encoded (/a b becomes /a%20b), and characters that are special in XML, such as the ampersand in a query string, are escaped as &amp; for you. Download it as sitemap.xml or copy it.

Worked example

Pasting https://example.com/ and https://example.com/about with weekly, 0.8 and a last-modified date of 2026-10-06 entered gives, for each URL:

  <url>
    <loc>https://example.com/about</loc>
    <lastmod>2026-10-06</lastmod>
    <changefreq>weekly</changefreq>
    <priority>0.8</priority>
  </url>

Which tags actually matter

TagStatus
<loc>Required. The absolute URL, which should be the canonical version.
<lastmod>Used by Google when it is consistently accurate, meaning the date the page content last meaningfully changed.
<changefreq>Ignored by Google.
<priority>Ignored by Google. It only ever described relative importance inside your own site.

The tool applies one change frequency and one priority to every URL, and offers them because the protocol defines them and some consumers still read them. For Google, the best output is often just <loc> and an honest <lastmod>. The last-modified field is empty by default, so no <lastmod> is written unless you enter a date (a "Use today" button fills in the current one). The date applies to every URL, so use it only when that is true: stamping everything with the current date teaches crawlers that your lastmod values are unreliable. You can set the change frequency and priority to "(omit)" to leave those tags out.

Limits and mistakes

  • Size. A single sitemap may hold at most 50,000 URLs and 50 MB uncompressed. Past 50,000 URLs on one host the generator splits that host's list into numbered files and makes a sitemap index pointing at them on the same host; submit the index. For a single-host list the names are sitemap-1.xml, sitemap-2.xml and so on, with sitemap.xml as the index. When the list covers several hosts, each host's index is sitemap-<host>.xml and its chunks are sitemap-<host>-1.xml, sitemap-<host>-2.xml and so on. If two names would clash, a counter such as -2 is added to the host part, and the index entries always match the files. It does not measure the 50 MB size, so very long URLs could still need a smaller split.
  • List only indexable URLs. Leave out redirects, 404s, noindex pages and URLs blocked by robots.txt. A sitemap full of those wastes crawl attention and clutters Search Console reports.
  • One host per sitemap. A sitemap should only list URLs on the same host and scheme as the file itself, because search engines ignore entries from other hosts. You can paste a mixed list anyway: the tool groups the URLs by scheme and host and writes a separate file for each, named after the host (sitemap-example.com.xml and sitemap-blog.example.org.xml, with the scheme added only when the same host appears over both http and https). Upload each file to the root of its own host and reference it in that host's robots.txt. A list with a single host keeps the plain sitemap.xml name. Exact duplicates are removed.
  • It is a hint, not a guarantee. Listing a URL does not force indexing, and URLs not listed can still be found through links.

Upload the file to your site root, add a Sitemap: line using the robots.txt generator, and submit it in Google Search Console. For multilingual sites see the hreflang tag generator, and use the broken link checker and the guide to finding and fixing broken links to prune dead URLs before listing them.

Examples

  • ▸ Three URLs become a <urlset> with three <url> entries, each containing <loc>, <changefreq> and <priority>, plus <lastmod> if you entered a date.
  • ▸ A line such as example.com/page (no http:// or https://) is skipped and listed in a warning, and a URL pasted twice is written once, with a note saying how many duplicates were removed.

Frequently asked questions

Where do I put sitemap.xml?

At your domain root (https://example.com/sitemap.xml) and referenced in robots.txt. Then submit it in Google Search Console and Bing Webmaster Tools.

How many URLs can one sitemap hold?

Up to 50,000 URLs or 50MB uncompressed. If one host has more than 50,000 URLs the tool splits them into numbered files and writes an index listing them, which you submit instead. For a single host these are sitemap-1.xml, sitemap-2.xml and a sitemap.xml index; with several hosts they are sitemap-<host>-1.xml and so on, with sitemap-<host>.xml as the index for that host. The 50 MB limit is not checked.

Do priority and changefreq matter?

Google ignores both priority and changefreq. Accurate URLs and an honest lastmod date are what matter most, so you can safely leave the other two as they are.

Should I fill in the last-modified date?

Only if it is true. The field is empty by default and the date you enter is applied to every URL, while Google only trusts lastmod when it is consistently accurate. Leave it blank unless all the listed pages really changed on that date; "Use today" fills in the current date for the case where they did.

Which URLs should go in a sitemap?

Only canonical, indexable pages that return 200. Leave out redirects, 404s, noindex pages and URLs blocked in robots.txt. All URLs in one file should be on the same host as that file.

Can I paste URLs from more than one site or subdomain?

Yes. The tool sorts the list by scheme and host and writes one sitemap per host, for example sitemap-example.com.xml and sitemap-shop.example.com.xml, each containing only the URLs for that host. Pick a file from the list to preview it, download them one at a time or all at once, and upload each to the root of its own host. A host with more than 50,000 URLs gets its own index and numbered files.

Does a sitemap guarantee my pages get indexed?

No. A sitemap helps search engines discover URLs, but whether a page is indexed depends on its quality and other signals. Pages not in the sitemap can still be found through links.

Related guides