Free tool

Sitemap XML generator: turn a list of URLs into a valid sitemap.xml

A sitemap.xml is a UTF-8 XML file that lists the URLs you want search engines to crawl, each in a <url> entry with a required <loc> and an optional <lastmod>, following the Sitemaps protocol. Paste your URLs, one per line, and this generator escapes them, flags duplicates and bad URLs, and splits anything over 50,000 URLs or 50MB into several files plus a sitemap index.

Updated

Absolute URLs only. Optionally add a date after a URL (space or comma) to set its own lastmod. Lines starting with # are ignored.

Google ignores changefreq and priority, and only uses lastmod when it's accurate. Set lastmod to the date the page content last changed, not today's date on every page.

5 of 7 lines included

sitemap.xml · 5 URLs · 489 B

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://acme.example/</loc>
  </url>
  <url>
    <loc>https://acme.example/pricing</loc>
  </url>
  <url>
    <loc>https://acme.example/docs/install</loc>
    <lastmod>2026-09-28</lastmod>
  </url>
  <url>
    <loc>https://acme.example/blog/utm-naming-conventions</loc>
  </url>
  <url>
    <loc>https://acme.example/search?q=sitemap&amp;sort=new</loc>
  </url>
</urlset>

Checks

  • Error: 1 URL skipped because it isn't absolute: "/about". The protocol requires full URLs starting with https://.
  • Warning: 1 duplicate URL removed: "https://acme.example/pricing".

Upload it to your site root (https://yourdomain.com/sitemap.xml), add a Sitemap: line to robots.txt, and submit it in Google Search Console.

Key takeaways

  • Every <loc> must be an absolute URL (https://…) on the same host the sitemap is served from, entity-escaped, and under 2,048 characters.
  • One sitemap file holds at most 50,000 URLs and 50MB uncompressed. Past that, split it and submit a sitemap index that lists the parts.
  • Google ignores <priority> and <changefreq>, and uses <lastmod> only when it's consistently accurate (Google Search Central).
  • A sitemap is a hint, not a command: it helps discovery, but it doesn't guarantee crawling or indexing.
  • Everything runs in your browser. The URLs you paste aren't sent anywhere.

What goes in a sitemap.xml file?

The Sitemaps protocol is shared by Google, Bing and other search engines. A file is a <urlset> in the protocol's namespace with one <url> per page. Only <loc> is required:

TagRequired?What it holdsDoes Google use it?
<loc>YesThe page's absolute URL, XML-escaped and under 2,048 characters.Yes.
<lastmod>NoWhen the page content last changed, in W3C Datetime: 2026-10-02 or 2026-10-02T09:30:00+00:00.Yes, if it's consistently and verifiably accurate.
<changefreq>Noalways, hourly, daily, weekly, monthly, yearly or never. The protocol calls it a hint.No, Google ignores it.
<priority>No0.0 to 1.0, relative to your other pages; 0.5 if omitted.No, Google ignores it.
Tag definitions from sitemaps.org; Google's handling from Google Search Central's "Build and submit a sitemap".
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://acme.example/</loc>
    <lastmod>2026-10-01</lastmod>
  </url>
  <url>
    <loc>https://acme.example/search?q=sitemap&amp;sort=new</loc>
    <lastmod>2026-09-28</lastmod>
  </url>
</urlset>
A minimal valid sitemap.xml. Note the & in the query string written as &amp;.

When a site has more URLs than one file allows, the protocol uses a sitemap index: a <sitemapindex> that lists each sitemap file in a <sitemap> entry. You submit the index, and search engines follow it to the parts. The generator builds this for you automatically when your list crosses either limit:

<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <sitemap>
    <loc>https://acme.example/sitemap-1.xml</loc>
    <lastmod>2026-10-01</lastmod>
  </sitemap>
  <sitemap>
    <loc>https://acme.example/sitemap-2.xml</loc>
    <lastmod>2026-10-01</lastmod>
  </sitemap>
</sitemapindex>
A sitemap index. See Google's guide to [managing large sitemaps](https://developers.google.com/search/docs/crawling-indexing/sitemaps/large-sitemaps).

How to create a sitemap.xml

  1. 1.Export the URLs you want indexed: from your CMS, your router's list of routes, or a crawl. Include only canonical pages that return 200 — not redirects, not pages marked noindex, not duplicate parameter variants.
  2. 2.Paste them into the generator, one per line. To give a page its own lastmod, add the date after the URL, separated by a space or comma: https://acme.example/pricing 2026-09-30.
  3. 3.Optionally set a default lastmod for lines without a date. Use the real date the content changed; stamping today's date on every page teaches search engines to ignore the field.
  4. 4.Fix what the checks flag: relative paths, non-http links, duplicates, and URLs from more than one host (www and non-www are different hosts).
  5. 5.Download sitemap.xml and upload it to your site root, so it loads at https://yourdomain.com/sitemap.xml. If the list was split, upload every part and the sitemap index next to each other.
  6. 6.Tell search engines where it is: add Sitemap: https://yourdomain.com/sitemap.xml to robots.txt (both the protocol and Google support this line) and submit it in Google Search Console's Sitemaps report and Bing Webmaster Tools.

A one-off sitemap goes stale the moment you publish a new page. Use this tool for small or static sites, to bootstrap a file, or to check a list before you automate it; on a site that changes often, have your framework or CMS generate the sitemap on each build.

Common sitemap.xml mistakes

  • Relative URLs such as /pricing. The protocol requires fully qualified URLs including the scheme, so these entries are invalid.
  • Unescaped characters. A raw & in a query string breaks the XML; it must be written as &amp; (and <, >, " and ' as entities too). The generator escapes them and percent-encodes spaces and non-ASCII characters.
  • Mixing hosts or protocols. A sitemap at https://acme.example/ should only list https://acme.example/ URLs. Listing http:// and https:// or www and non-www versions of the same page sends conflicting canonical signals.
  • Relying on priority and changefreq. Google's documentation says it ignores both (source). They're harmless and other engines may read them, but they won't change how Google crawls you.
  • A fake lastmod. Setting every page to today's date on each deploy makes the field untrustworthy, and Google says it only uses lastmod when it's verifiably accurate.
  • Listing URLs you don't want indexed: redirects, 404s, noindex pages, login pages, or URLs blocked in robots.txt. Check them with the robots.txt tester first.
  • Going over 50,000 URLs or 50MB in one file. Search engines can reject an oversized sitemap; split it and use a sitemap index.
  • Pinging instead of submitting. Google retired its sitemap ping endpoint in 2023; use robots.txt and Search Console instead.

Check that search engines actually fetch it

Submitting a sitemap doesn't prove anyone reads it. With VisitTrack's AI crawler tracking, a few lines in your backend report each request's user-agent and path, so you can see when Googlebot, Bingbot, ChatGPT, Claude or Perplexity request /sitemap.xml and which pages they crawl afterwards — next to your human traffic. Once pages are indexed, VisitTrack shows your Google Search Console keywords next to the visits, signups and revenue each page brings in.

Pair the sitemap with the rest of your crawl setup: decide which AI bots may crawl you with the AI crawler robots.txt generator, and give AI assistants a curated overview with the llms.txt generator.

Frequently asked questions

What is a sitemap.xml?

A sitemap.xml is an XML file that lists the URLs on a site you want search engines to crawl, optionally with the date each page last changed. It follows the Sitemaps protocol at sitemaps.org, which Google, Bing and other search engines support.

How many URLs can a sitemap contain?

Up to 50,000 URLs, and the file can't be larger than 50MB uncompressed. For more, split the URLs across several sitemaps and list them in a sitemap index file, which can reference up to 50,000 sitemaps.

Does Google use priority and changefreq?

No. Google Search Central's sitemap documentation says Google ignores the priority and changefreq values. It does use lastmod, but only when the value is consistently and verifiably accurate.

Where should I put my sitemap.xml?

At the root of your site, so it loads at https://yourdomain.com/sitemap.xml. Under the protocol, a sitemap only covers URLs in its own directory and below, so a file at the root can list every page on that host. Then reference it in robots.txt and submit it in Google Search Console.

Do I need a sitemap at all?

Not always. Google says small sites that are well linked internally may not need one. A sitemap helps most on large sites, new sites with few inbound links, and sites with pages that aren't easy to reach through navigation.

Does a sitemap guarantee my pages get indexed?

No. A sitemap is a hint that helps search engines discover URLs. Whether a page is crawled and indexed still depends on its quality, canonical signals, robots rules and the engine's own crawling decisions.

Is the URL list I paste uploaded anywhere?

No. The generator runs entirely in your browser; the URLs and the generated XML never leave your device.

Related tools and guides

See which crawlers read your sitemap — and which pages earn revenue

VisitTrack logs Googlebot and AI crawler fetches next to your human traffic, signups and revenue. 14 days free, no card.

14-day free trial · No card required · Cookie-free · Cancel anytime

Or explore the live demo first →