# XML Sitemap Generator

> The XML Sitemap Generator turns a list of URLs (pasted or from a CSV file) into a valid sitemap.xml with optional lastmod, changefreq and priority, and splits lists above 50,000 URLs into several files plus a sitemap index.

URL: https://atechcraft.com/sitemap-generator/
Category: SEO Tools
Last updated: 2026-12-01
Author: Abdul Moid Khan, ATechCraft

Runs in your browser. Your data never leaves your device.

## How to use the XML Sitemap Generator

1. Paste one URL per line, or upload a CSV whose first column holds the URLs.
2. Choose whether to add lastmod, changefreq and priority.
3. Review invalid or duplicate URLs that were skipped.
4. Download the sitemap (or the ZIP of split files) and upload it to your site root.

## What is an XML sitemap generator?

An XML sitemap generator turns a list of your website's URLs into a `sitemap.xml` file that search engines can read. This tool takes URLs you paste or upload as a CSV, removes duplicates and invalid lines, adds optional `lastmod`, `changefreq` and `priority` values, and splits very large lists into several files with a sitemap index.

It does not crawl your website. You supply the list, which keeps the tool fast and private and works for sites behind a login or still in development.

## How does an XML sitemap work?

A sitemap follows the [sitemaps.org protocol](https://www.sitemaps.org/protocol.html), supported by Google, Bing and other search engines. Each page gets a `<url>` entry:

```xml
<url>
  <loc>https://example.com/about/</loc>
  <lastmod>2026-12-01</lastmod>
</url>
```

Only `<loc>` is required. The protocol sets two limits per file: **50,000 URLs** and **50 MB** uncompressed. Bigger sites list several sitemaps in a sitemap index file. This generator splits your list automatically at 50,000 URLs and offers all files plus the index as one ZIP download.

Special characters must be escaped in XML. The generator converts `&` to `&amp;` and does the same for quotes and angle brackets, so a URL like `?a=1&b=2` stays valid.

## Do lastmod, changefreq and priority matter?

| Tag | What it means | How Google treats it |
| --- | --- | --- |
| `lastmod` | Date the page last changed in a meaningful way | Used if it is consistently accurate |
| `changefreq` | How often the page usually changes | Ignored |
| `priority` | Importance relative to your other pages | Ignored |

This comes from [Google's sitemap documentation](https://developers.google.com/search/docs/crawling-indexing/sitemaps/build-sitemap). Bing has said it also relies on `lastmod`. The tool still offers `changefreq` and `priority` because some other search engines and SEO plugins read them, but you can leave them empty.

## Worked example

You paste this list, exported from a spreadsheet:

```text
url
https://shop.pk/
https://shop.pk/shoes/
https://shop.pk/shoes/
shop.pk/bags
https://shop.pk/sale/?season=winter&size=all
```

The tool reports **3 valid URLs, 1 duplicate removed, 1 invalid skipped**. The header row "url" is ignored, the repeated `/shoes/` is dropped, and `shop.pk/bags` is skipped because it has no `https://`. The sale URL is kept, with `&` escaped as `&amp;` in the output.

With "Add lastmod" ticked, every entry gets today's date. That is fine for a new site; for an existing site, only set `lastmod` to dates that reflect real changes.

## Tips

1. **List only canonical, indexable pages.** Leave out redirects, 404s, `noindex` pages and filtered or tracking URLs.
2. **Use one URL format.** Pick `https://` and either `www` or non-`www`, with or without a trailing slash, and stick to it. Redirect the others with the [.htaccess Redirect Generator](https://atechcraft.com/htaccess-redirect-generator/).
3. **Tell search engines about it.** Add a `Sitemap:` line to robots.txt (the [Robots.txt Generator](https://atechcraft.com/robots-txt-generator/) does this) and submit it in Google Search Console and Bing Webmaster Tools.
4. **Multilingual sites** can add language alternates to the sitemap with the [Hreflang Tag Generator](https://atechcraft.com/hreflang-generator/).
5. **Clean URLs first.** Readable slugs from the [Slug Generator](https://atechcraft.com/slug-generator/) make sitemaps easier to audit.

## How often should I update my sitemap?

Update it whenever you add, remove or rename pages. For a small business site that may be once a month; for a news site it may be many times a day, which is why large sites generate sitemaps automatically. After a big change, resubmit the sitemap in Search Console so Google notices it sooner. Search engines also re-read sitemaps on their own schedule, so you don't need to resubmit after every small edit.

## Limitations

- The tool does not crawl your site, so it cannot find pages you don't list.
- It does not check whether URLs return a 200 status or redirect.
- It writes standard URL sitemaps only, not image, video or news sitemap extensions.
- One `lastmod` value is applied to all URLs. For per-page dates, use your CMS or build tool.
- Very large lists (hundreds of thousands of URLs) depend on your device's memory.

Pairing a sitemap with an [llms.txt file](https://atechcraft.com/llms-txt-generator/) gives both search engines and AI assistants a clear map of your important pages.

## Frequently asked questions

### How many URLs can one sitemap hold?

Up to 50,000 URLs and 50 MB uncompressed, according to the sitemaps.org protocol. Larger sites use several sitemaps listed in a sitemap index file.

### Does Google use changefreq and priority?

Google has said it ignores changefreq and priority. It does use lastmod when the value is consistently accurate.

### Should every page be in my sitemap?

Include only canonical pages you want indexed. Leave out redirects, noindex pages and duplicate URLs with parameters.

### How do I tell search engines about my sitemap?

Add a Sitemap: line to robots.txt and submit the URL in Google Search Console and Bing Webmaster Tools.
