XML Sitemap Generator

Paste or upload your URLs and get a valid, de-duplicated XML sitemap, split into several files with a sitemap index when your site is large.

Runs entirely in your browser. Nothing you add is sent to us.

Create a free account to use the XML Sitemap Generator

Free forever for this tool. Takes a few seconds — then you come straight back here.

  • All 150 free tools, one login
  • Free website audit with fixes
  • Search Console dashboard
  • Free keyword rank tracker

Already have an account? Sign in

Published it? Verify it with the free Sitemap checker →

XML Sitemap Generator — xml sitemap generator

An XML sitemap generator turns a list of your page addresses into the sitemap file search engines read to find and recrawl your content. Paste URLs, upload a text or CSV file, or paste an existing sitemap, and our tool cleans and de-duplicates the list, adds optional lastmod dates, and writes valid XML. Large sites are split automatically into several files of up to 50,000 URLs with a sitemap index, ready to download one by one or as a ZIP.

How to use the XML sitemap generator

  1. 1 Sign in and open the generatorLog in to your free account and open the XML Sitemap Generator from the tools list.
  2. 2 Add your URLsPaste one address per line, upload a .txt or .csv file (for example an export from your CMS or a crawler), or paste an old sitemap to rebuild it.
  3. 3 Choose the clean-up optionsRemove tracking parameters, switch http to https, keep one host and set your trailing slash rule. Add lastmod dates if you have accurate ones.
  4. 4 Generate and downloadPress Generate, check the summary and preview, then download the file, or the ZIP of all files and the index for big sites.
  5. 5 Upload and submitUpload the files to your site, add a Sitemap line to robots.txt and submit the sitemap in Google Search Console and Bing Webmaster Tools.

What an XML sitemap is for

An XML sitemap is a file that lists the URLs on your site you want search engines to know about. It follows the sitemaps.org protocol, which Google, Bing and other search engines support. Crawlers still find most pages by following links, but a sitemap helps them discover new pages faster, spot pages that are hard to reach through links, and notice when pages have changed.

A sitemap is a hint, not a command. Listing a URL does not guarantee it will be crawled or indexed, and leaving one out does not stop it being found. What a good sitemap does is give search engines a clean, reliable list of your important pages, which matters most for new sites, large sites and sites with pages buried deep in the navigation.

Most content management systems can build a sitemap automatically. WordPress has one built in at /wp-sitemap.xml, and SEO plugins replace it with their own. A generator like this one is useful when your platform does not make one, when the automatic one includes pages you do not want, when you are moving platforms, or when you need a sitemap for a static site or a specific section.

How the generator cleans your URL list

Real URL lists are messy. Exports from analytics tools include tracking parameters, crawler exports include duplicates, and hand-made lists mix http and https or relative paths. The generator normalises each line before writing the sitemap, so every URL appears once, in the form you want indexed.

If your CSV has a header row, the generator looks for a column called url, loc, address or link for the page address, and a column called lastmod, last modified, updated or date for the date. Without a header, it uses the first column that looks like a URL. If you paste an existing sitemap, it extracts every loc value, so you can rebuild or split an old file in seconds.

  • Removes fragments such as #reviews, which search engines ignore.
  • Optionally removes tracking parameters such as utm_source, gclid and fbclid.
  • Optionally switches http:// to https:// and adds or removes trailing slashes consistently.
  • Turns relative paths such as /about into full URLs when you give it your site address.
  • Percent-encodes spaces and non-ASCII characters and escapes ampersands so the XML is valid.
  • Drops exact duplicates and lines that are not web addresses, and tells you how many it skipped.
  • Optionally keeps only URLs on the main host, because a sitemap may only list URLs on its own host unless you have verified the others.

lastmod, changefreq and priority: what Google uses

Each URL in a sitemap can carry three optional tags. Google has said it ignores changefreq and priority. It does use lastmod, but only when the dates are consistently accurate, meaning they reflect real, significant changes to the page content rather than the date the sitemap was generated.

That is why the generator leaves all three out unless you choose otherwise. If your CSV contains genuine last-modified dates, select From the CSV column and they are converted to the W3C date format sitemaps require (YYYY-MM-DD). UK-style dates such as 23/10/2026 are understood. Avoid setting one date for every page unless the whole site really did change that day, because inaccurate dates teach search engines to ignore your lastmod values. Other search engines may still read changefreq and priority, so the options remain available if you need them.

Sitemap size limits and sitemap index files

One sitemap file can hold up to 50,000 URLs and must be no larger than 50 MB uncompressed. Bigger sites split their URLs across several sitemap files and list those files in a sitemap index, which is a small XML file pointing to each sitemap. You then submit only the index.

The generator handles this automatically. It fills each file up to the URL limit you set, 50,000 by default, and starts a new file early if the next URL would push it past 50 MB. When there is more than one file, it also writes the index, using the folder address you give for where the files will live. Smaller files, such as 10,000 URLs each, can make it easier to see which section of a big site has indexing problems in Search Console, so you can lower the limit if that helps.

All files can be downloaded individually or together as a ZIP. Everything happens in your browser, so even a list of hundreds of thousands of URLs is never uploaded anywhere.

Which URLs belong in your sitemap

A sitemap should list the canonical version of every page you want in search results, and nothing else. Each URL should load directly with HTTP 200, carry no noindex, and have a canonical tag pointing to itself. Listing redirects, error pages or duplicates wastes crawling and makes the sitemap less trustworthy.

Leave out thank-you pages, internal search results, filtered and sorted listing pages, login and account pages, and tag or archive pages you have set to noindex. If you are unsure about a particular page, run it through our indexability checker first.

  • Include: home, service and product pages, category pages you want ranked, blog posts, location pages and key information pages.
  • Exclude: redirects, 404s, noindex pages, URLs with tracking or session parameters, and pages whose canonical points elsewhere.

Publishing and submitting your sitemap

Upload the sitemap to the root of your site, for example https://www.example.co.uk/sitemap.xml. A sitemap in a sub-folder should only list URLs in that folder or below, so the root is the simplest choice. Then add a Sitemap line with the full URL to your robots.txt, which lets every search engine find it without being told.

Submit the sitemap, or the index file for large sites, in Google Search Console under Sitemaps, and in Bing Webmaster Tools. Google retired its old sitemap ping service in 2023, so submitting in Search Console and listing the sitemap in robots.txt are now the ways to tell Google about it. Search Console reports how many URLs it discovered from each sitemap and any errors it found.

Finally, keep the sitemap up to date. A static file generated once goes stale as you add and remove pages. Regenerate it whenever your site changes significantly, or switch to an automatic sitemap from your CMS once one is available, and check it now and then with our free sitemap checker.

Examples you can copy

A minimal valid sitemap with lastmod

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://www.example.co.uk/</loc>
    <lastmod>2026-10-01</lastmod>
  </url>
  <url>
    <loc>https://www.example.co.uk/services/boiler-repair/</loc>
    <lastmod>2026-09-14</lastmod>
  </url>
</urlset>

A sitemap index listing two sitemap files

<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <sitemap><loc>https://www.example.co.uk/sitemap-1.xml</loc></sitemap>
  <sitemap><loc>https://www.example.co.uk/sitemap-2.xml</loc></sitemap>
</sitemapindex>

A CSV the generator can read

url,lastmod
https://www.example.co.uk/,2026-10-01
https://www.example.co.uk/contact/,2026-06-30

Telling every search engine where the sitemap is (robots.txt)

Sitemap: https://www.example.co.uk/sitemap.xml

Common mistakes to avoid

Listing redirects and 404s

Only include URLs that load directly with HTTP 200. Run a sitemap checker after generating to catch any that slipped in.

Setting today's date as lastmod on every page

Inaccurate dates teach Google to ignore your lastmod. Use real modification dates or leave lastmod out.

Mixing http and https or www versions

List only the version your site redirects to. Mixed versions point search engines at redirects.

Including noindex or canonicalised pages

A sitemap that lists pages you have told Google not to index sends contradictory signals.

Forgetting to update the file

A one-off sitemap goes stale. Regenerate it when you add or remove pages, or use an automatic one from your CMS.

Unescaped ampersands

A raw & in a URL breaks the XML. The generator escapes it as &amp; for you; hand-edited files often miss this.

Frequently asked questions

No. Google has said it ignores both. It uses lastmod when the date is consistently accurate, so a correct lastmod is worth far more than either.

Up to 50,000 URLs and 50 MB uncompressed. Larger sites split their URLs across several sitemap files and list them in a sitemap index file, which this generator does for you.

It is not essential if every page is linked from your navigation, but it is quick to create and helps new pages get found sooner. Google recommends one for new sites and sites with few external links.

In the root of your site, such as /sitemap.xml, listed in robots.txt and submitted in Google Search Console.

Not with this generator, which writes standard URL sitemaps. Google can usually find images and videos on the pages themselves.

Only if you have verified ownership of both sites in Search Console or list the sitemap in the other site's robots.txt. Otherwise keep each sitemap to its own host.

You can. Search engines accept sitemap.xml.gz, and the 50 MB limit applies to the uncompressed size. For most small and medium sites it is not necessary.

No. The list is processed entirely in your browser and the files are created on your device.

Free website audit

See how your site scores, free

Speed, SEO, DNS, email (SPF/DKIM/DMARC) and security in one scan, with a prioritised fix list.