Sitemap.xml Generator

Build a sitemap.xml from a list of URLs.

Open tool

Overview

The Sitemap.xml Generator takes a list of URLs — pasted, one per line — and produces a well-formed sitemap.xml document with optional <lastmod>, <changefreq>, and <priority> per URL. Output is the exact XML you upload to your web root or reference from robots.txt.

Useful for SEO practitioners and developers learning how to generate a sitemap.xml file or how to build a sitemap for a static site. Reach for it after a content audit, when migrating CMSes, or when you need a one-off sitemap for a microsite the framework does not produce automatically.

How it works

The Sitemaps protocol requires a <urlset> root with the namespace http://www.sitemaps.org/schemas/sitemap/0.9. Each <url> contains a <loc> (required, must be absolute) and optional <lastmod> (W3C date), <changefreq> (always, hourly, daily, weekly, monthly, yearly, never), and <priority> (0.0 to 1.0).

The generator XML-encodes special characters in the URL, validates absolute form, and clamps <priority> to the spec range. If the URL count exceeds 50,000 (or output size exceeds 50 MB), output is split into multiple files and a sitemap index is produced.

Examples

  • 200 article URLs with the same <lastmod> and weekly change frequency.
  • A homepage entry with <priority>1.0</priority> and the rest at default 0.5.
  • A multilingual site with <xhtml:link rel="alternate" hreflang="fr"> per URL.
  • A large e-commerce catalog splits across multiple sitemap files referenced by an index.

FAQ

Do I need lastmod, changefreq, priority?

Only <loc> is required. Google has stated it ignores <changefreq> and <priority> and partially relies on <lastmod> only when it's accurate.

Where do I host the sitemap?

At the web root by convention (/sitemap.xml) and reference it from robots.txt with a Sitemap: directive. The path can be anywhere accessible.

Should I include URLs that 404 or redirect?

No — only canonical, indexable URLs that return 200. Sitemap URLs that redirect or 404 trigger Search Console warnings.

What if I have more than 50,000 URLs?

Split into multiple sitemap files (each under 50k URLs and 50 MB) and reference them from a sitemap index file. The generator handles this automatically.

Try Sitemap.xml Generator

An unhandled error has occurred. Reload ×