XML Sitemap Generator

Paste the URLs of your pages, one per line, to get a standards-compliant sitemap.xml ready to upload. Invalid and relative lines are skipped and listed, duplicates are removed, special characters such as ampersands are escaped, and you're warned if URLs come from more than one host or exceed the 50,000-URL limit. Add a last-modified date, or switch to sitemap-index mode to list several sitemap files. Changefreq and priority are available but explained honestly, since Google ignores them.

Input

206 characters

Output

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

Checks

  • Pass 5 unique URLs in the sitemap.
  • Fix 1 lines were skipped because they aren't absolute URLs: /relative-page/
  • Check 1 duplicate URLs were removed.
  • Info Upload the file to your site root, add a Sitemap: line to robots.txt and submit it in Google Search Console and Bing Webmaster Tools.

Runs entirely in your browser. Nothing you paste or open here is uploaded or stored.

How to use the sitemap generator

  1. Paste your page URLs, one per line. They must be absolute (https://…).
  2. Optionally set a last-modified date, or press Use today.
  3. Leave changefreq and priority out unless another search engine you care about uses them.
  4. Check the results: skipped lines, removed duplicates and host warnings.
  5. 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&amp;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.

Frequently asked questions

Do I need a sitemap?

Small, well-linked sites are usually crawled fine without one. A sitemap helps when a site is large, new with few external links, has pages that aren't well linked internally, or changes often. It's a hint, not a guarantee of indexing.

Which URLs should go in the sitemap?

Only canonical, indexable pages that return status 200: the version of each URL you want in search results. Leave out redirects, error pages, noindex pages, duplicates with tracking parameters, and pages blocked by robots.txt.

Should I set changefreq and priority?

Google ignores both. An accurate lastmod date, updated only when the page content really changes, is the one optional field it uses. Other search engines may still read changefreq and priority, so they're available if you want them.

What if I have more than 50,000 URLs?

Split them into several sitemap files of up to 50,000 URLs and 50 MB each, then create a sitemap index that lists those files and submit the index.

Where should I upload the sitemap?

Usually at the root of your site, such as /sitemap.xml. Then add a Sitemap line to robots.txt and submit the URL in Google Search Console and Bing Webmaster Tools.

Sources