XML Sitemap Generator
Create a sitemaps.org XML sitemap from a URL list or text file, with lastmod dates, XML escaping, duplicate removal and the 50,000 URL limit.
The interactive tool loads here when JavaScript runs.
About this toolWhat is the XML Sitemap Generator?
The XML Sitemap Generator turns a list of page URLs into a sitemap.xml that follows the sitemaps.org 0.9 protocol. Add URLs one by one, add a set of common pages, or import a .txt or .csv file with one URL per line, then click Generate XML Sitemap and copy or download the file.
Each URL is resolved to an absolute address (paths like /about use the Base URL), escaped for XML so an ampersand in a query string becomes &, and de-duplicated. URLs that cannot be made absolute are skipped and reported, and anything beyond 50,000 URLs is left out with a note to split the sitemap. Last Modified is only written when you set it; imported URLs and common pages are not stamped with today's date.
The generator does not crawl your site. It builds the file from the URLs you give it, entirely in your browser, which makes it suited to small sites, landing page collections and one-off sitemaps rather than large sites that should generate sitemaps from their CMS or build step.
- sitemaps.org 0.9 urlset output with XML entity escaping
- Relative path resolution from a Base URL
- Import from .txt or .csv; duplicates removed
- Enforces the 50,000 URL limit and reports skipped URLs
- Copy or download sitemap.xml; runs locally
Updated
How to use the XML Sitemap Generator
- Enter your site in Base URL, for example https://example.com, so relative paths can be resolved.
- Add URLs with Add URL, Add Common Pages, or Import URLs (a .txt or .csv file with one URL per line; the first CSV column is used).
- For each URL, set Last Modified to the real date the content changed, and optionally a Change Frequency and Priority.
- Click Generate XML Sitemap. A message lists any skipped, duplicate or over-limit URLs.
- Copy or Download sitemap.xml, upload it to your site, and submit it in Search Console or reference it from robots.txt.
Worked examples
Relative path with a query string
Input
Base URL https://example.com, URL /about?ref=nav&lang=en
Output
<url> <loc>https://example.com/about?ref=nav&lang=en</loc> <changefreq>weekly</changefreq> <priority>0.8</priority> </url>
The path is resolved against the base URL and the & is written as &. An unescaped & makes the whole file invalid XML.
No base URL
Input
URLs: /contact and https://example.com/
Output
Sitemap with 1 URL; 1 relative or invalid URL skipped
Sitemaps require fully qualified URLs. Set the Base URL and generate again to include /contact.
Background and insight
Google introduced the Sitemaps protocol in 2005, and Yahoo and Microsoft adopted it as sitemaps.org in 2006. A sitemap is a UTF-8 XML file with a urlset element and one url entry per page. Each entry must have a loc with the full URL, and may have lastmod, changefreq and priority. A single file may contain at most 50,000 URLs and be at most 50 MB uncompressed; larger sites use a sitemap index that lists several sitemaps.
Of the optional fields, only lastmod matters to Google, and only when it is consistently accurate: the date the page's main content last changed, not the date the file was generated. Google has said it ignores priority and changefreq. The generator keeps those fields because other consumers may read them, but they will not change how Google crawls you.
A sitemap is a discovery hint, not an index request. Listing a URL does not guarantee it will be crawled or indexed, and leaving it out does not block it. Submit the sitemap in Google Search Console or Bing Webmaster Tools, or add a Sitemap line to robots.txt. Google retired its sitemap ping endpoint in 2023, so pinging is no longer an option.
Common use cases
Small static sites
Create a sitemap for a portfolio or brochure site that has no CMS plugin.
Launching a batch of landing pages
Import the list of new URLs and submit a dedicated sitemap so they are discovered quickly.
Cleaning an exported URL list
Paste a CSV from a crawler and get a de-duplicated, escaped sitemap.
Splitting by section
Make separate sitemaps for blog, docs and product pages to watch indexing per section in Search Console.
Tips and limitations
- Only list canonical, indexable URLs that return 200. Redirects, noindex pages and duplicates waste the crawler's attention.
- Set lastmod only when the main content changes. A date that changes on every build teaches Google to ignore it.
- All URLs should be on the same host as the sitemap, unless you have verified the other hosts in Search Console.
- Sitemaps can be gzip-compressed; the 50 MB limit applies to the uncompressed size.
- The protocol caps a file at 50,000 URLs. Beyond that, split the list and create a sitemap index.
Sources and further reading
- Sitemaps XML format, Sitemaps protocol. The protocol, including the 50,000 URL and 50 MB limits
- Build and submit a sitemap, Google Search Central. Which fields Google reads and how to submit
- Sitemaps ping endpoint is going away, Google Search Central Blog. The 2023 notice on ping, priority, changefreq and lastmod
Frequently asked questions
How many URLs can one XML sitemap contain?
At most 50,000 URLs, and the file may be no larger than 50 MB uncompressed. For bigger sites, split the URLs across several sitemaps and list them in a sitemap index file, which can itself reference up to 50,000 sitemaps. The generator stops at 50,000 and tells you how many were left out.
Does Google use priority and changefreq in sitemaps?
No. Google has stated that it ignores the priority and changefreq values. It uses lastmod when the dates are consistently accurate, meaning they reflect real changes to the page's main content. The fields are still valid XML and other search engines or tools may read them.
Why must ampersands be escaped in a sitemap URL?
A sitemap is XML, and a bare & starts an entity reference, so a URL like ?a=1&b=2 makes the file invalid and parsers stop reading. Write it as &. The generator also escapes <, >, quotes and apostrophes, as the sitemaps.org protocol requires.
Should lastmod be set to today for every URL?
No. lastmod should be the date the page content actually changed. Stamping every URL with the generation date makes the field meaningless, and Google learns to ignore lastmod on sites where it is not accurate. That is why imported URLs here are left without a date until you set one.
Do I still need to ping Google after updating a sitemap?
No. Google retired the sitemap ping endpoint in 2023. Submit the sitemap once in Search Console and reference it in robots.txt with a Sitemap line; Google refetches it on its own schedule and uses accurate lastmod values to find changed pages.
Can a sitemap contain relative URLs like /about?
No. Every loc must be a fully qualified URL including the protocol, such as https://example.com/about. Fill in the Base URL field and the generator resolves relative paths for you; without it, relative entries are skipped and listed in the message.
Is there an in-depth guide to the XML Sitemap Generator?
Yes. “Robots.txt and XML Sitemaps: How Crawlers Actually Read Them” covers the background, how it works, common pitfalls and worked examples. Read the full guide.
Related Tools You May Like
Free, in-browser tools that pair well with this one.