XML Sitemap Generator
Paste your URLs and get a valid, escaped sitemap.xml — with deduplication, trailing-slash normalisation, sitemap index support and live limit checks.
Photo by Alina Grubnyak on Unsplash
XML sitemap generator
Relative paths are resolved against the base URL below.
Key takeaways
- A sitemap aids discovery; it is not a ranking factor and does not guarantee indexing.
- Google ignores changefreq and priority entirely — only an honest lastmod carries signal.
- Include only canonical, indexable URLs that return 200, and split at 50,000 URLs or 50 MB.
What an XML sitemap is for
A sitemap is a machine-readable list of the URLs on your site that you consider worth crawling. It is a discovery aid, not a ranking mechanism. Submitting a URL in a sitemap does not guarantee indexing, and omitting one does not prevent it: Google will still crawl anything it finds by following links.
Sitemaps genuinely help in four situations:
- The site is large and internal linking is shallow, so some pages sit many clicks from the homepage.
- The site is new and has few external links pointing at it.
- Pages are orphaned or reachable only through search or filters.
- You publish frequently and want
lastmodto signal what changed.
The format is defined by the sitemaps.org protocol 0.9, jointly adopted by Google, Bing and Yahoo in 2006, and it has barely changed since.
Format rules and hard limits
| Rule | Limit |
|---|---|
| URLs per sitemap file | 50,000 |
| Uncompressed file size | 50 MB |
| Sitemaps per index file | 50,000 |
| URL length | 2,048 characters |
| Encoding | UTF-8, with XML entity escaping |
| Location | A sitemap can only list URLs at or below its own directory |
Beyond either limit, split into multiple files and reference them from a sitemap index. Five ampersands, angle brackets and quotes must be escaped as &, <, >, " and ' — this generator does that automatically, and you can inspect the rules in the entities reference.
What belongs in a sitemap
Include only URLs you would be happy to see in search results. A sitemap listing pages that are noindexed, redirected, canonicalised elsewhere or returning errors sends contradictory signals and wastes crawl budget.
| Include | Exclude |
|---|---|
| Canonical, indexable, 200-status URLs | Anything returning 3xx, 4xx or 5xx |
| One URL per piece of content | Non-canonical duplicates and parameter variants |
| Paginated series, if each page is useful | Pages with noindex |
| Important media and alternate language versions | URLs blocked in robots.txt |
| Absolute URLs on the canonical host | Mixed http/https or www/non-www forms |
Check your candidate URLs against the rules in your robots.txt before publishing, and confirm the status codes with the status code reference.
Publishing and submitting
- Upload the file to your web root, typically
https://example.com/sitemap.xml. - Reference it from robots.txt:
Sitemap: https://example.com/sitemap.xml. Every major crawler reads this. - Submit it in Google Search Console under Indexing → Sitemaps, and in Bing Webmaster Tools.
- Check the report a few days later: “Discovered” counts should roughly match your URL count, and any parse errors will be listed.
# robots.txt
User-agent: *
Allow: /
Sitemap: https://example.com/sitemap.xml
Sitemap: https://example.com/sitemap-images.xmlSitemaps may be gzipped (sitemap.xml.gz) and must still be under 50 MB uncompressed. There is no need to ping search engines manually any more — the ping endpoints were deprecated by Google in 2023.
Frequently Asked Questions
Do I need an XML sitemap?
Not always. Small, well-linked sites are crawled fine without one. Sitemaps help most for large sites, new sites with few inbound links, and sites with pages that are hard to reach by following links.
Does a sitemap improve rankings?
No. It helps discovery and can speed up crawling of new or updated pages, but it is not a ranking factor. Being in a sitemap does not guarantee indexing either.
Should I set priority and changefreq?
Google ignores both. Accurate lastmod is the only optional element worth maintaining. This generator omits changefreq by default for that reason.
How many URLs can one sitemap contain?
50,000 URLs or 50 MB uncompressed, whichever comes first. Past that, split into multiple files and list them in a sitemap index.
Where should the sitemap file live?
Usually at the site root. A sitemap can only include URLs at or below its own directory level, so a file at /blog/sitemap.xml cannot list /products/ URLs.
Should noindex pages be in the sitemap?
No. Listing a page you have told search engines not to index is contradictory. Include only canonical, indexable URLs that return 200.
How often should I update it?
Whenever content is added or meaningfully changed — ideally automatically as part of your build or publish step, so lastmod stays truthful.
Sources & further reading
- sitemaps.org protocol 0.9 — the canonical format specification
- Google Search Central: Build a sitemap — current guidance, including which tags Google uses
- Google: sitemaps lastmod and ping — confirmation that lastmod is used and the ping endpoint is deprecated
- Bing Webmaster: Sitemaps — Bing-specific submission and limits