Sitemap XML Generator
Turn same-host URLs or paths into sitemap XML with normalization and exclusion checks, then review protocol limits before publishing.{{ summaryTitle }}
{{ summaryLine }}
{{ xmlExportStatus }}
{{ sitemapXml }}
| Line | Status | URL | lastmod | changefreq | priority | Note | Copy |
|---|---|---|---|---|---|---|---|
| {{ row.line }} | {{ row.status }} | {{ row.loc || row.source }} | {{ row.lastmod || '—' }} | {{ row.changefreq || '—' }} | {{ row.priority || '—' }} | {{ row.note }} |
The chart renderer is unavailable. The same row statuses remain available in the URL inventory.
| Check | Status | Detail | Copy |
|---|---|---|---|
| {{ row.check }} | {{ row.status }} | {{ row.detail }} |
A sitemap is a declared inventory of URLs that a site owner wants search engines to discover. It is especially useful when pages are new, deeply linked, numerous, or updated through systems that make ordinary link discovery incomplete.
The inventory should contain preferred public URLs, not every address a server can produce. Tracking variants, duplicate paths, redirects, private pages, and non-canonical copies can make a sitemap larger without making it more useful. Search engines may use a sitemap as a discovery hint, but inclusion does not guarantee crawling or indexing.
- Canonical URL
- The preferred address for a page when the same content is available through several URLs.
loc- The required absolute URL inside each sitemap entry.
lastmod- An optional date or timestamp for the page’s last significant update, not the date the sitemap was generated.
changefreqandpriority- Optional protocol hints. Google ignores both fields, so they should not be treated as crawl scheduling or ranking controls.
XML adds two responsibilities beyond choosing the right URLs. Values must be entity-escaped so characters such as an ampersand do not break the document, and each file must stay within the protocol limits of 50,000 URLs and 52,428,800 uncompressed bytes. Larger inventories need several sitemap files and usually a sitemap index.
Dates deserve restraint. An accurate lastmod can help a crawler decide what changed, while a date that is refreshed mechanically on every generation loses that meaning. Omitting uncertain dates is more honest than filling every row with the same current date.
A complete publishing check extends beyond XML syntax. The listed pages still need to be reachable, canonical, indexable, and appropriate for search, and the public sitemap response must serve the XML rather than a redirect, login page, or HTML error.
How to Use This Tool:
Begin with a reviewed canonical URL inventory and the exact HTTP or HTTPS origin that owns it.
- Paste one URL or path per line into URL inventory, or load a local TXT, CSV, or TSV file. Optional columns follow the order URL,
lastmod,changefreq, andpriority. - Enter Site origin. Root-relative paths are resolved against it, while absolute URLs on a different host are excluded by this generator.
- Choose a Lastmod handling policy. Use per-line values when dates are maintained accurately, apply a fallback only when it represents real significant updates, or omit the element.
- Decide whether to emit optional hint tags and whether duplicate URLs or common tracking parameters should be removed. Preserve query parameters when they identify distinct canonical content.
- Review URL inventory for Included, Review, and Excluded rows. Resolve unexpected cleanup, invalid dates, cross-host URLs, and duplicates before copying the XML.
- Read Publish checks, validate the saved XML, serve it publicly, and confirm the published URL returns the expected document before referencing or submitting it.
Interpreting Results:
Included rows are emitted in the XML. Review rows are also emitted but were changed or given fallback values. Excluded rows do not appear in the sitemap. A nonzero review count is therefore a request for inspection, not a failure count.
Ready with checks means the document passed the generator’s structural and size checks while still requiring a publishing handoff. Split before publishing means the generated file exceeds the inclusive limit of 50,000 URLs or 52,428,800 uncompressed bytes.
Do not read a clean status as evidence that pages are live or indexable. Validate the XML independently, fetch the public sitemap, and inspect canonical, robots, authentication, redirect, and HTTP-status behavior for representative URLs.
Technical Details:
An XML sitemap uses the sitemap protocol namespace and one url element per included address. The required loc child may be followed by optional lastmod, changefreq, and priority children.
Transformation Core: Source line to XML entry
| Stage | Transformation | Review or exclusion |
|---|---|---|
| Parse | Split a non-comment line by tab, pipe, or CSV commas. | A missing first field is excluded. |
| Resolve | Turn a path into an absolute URL using the normalized site origin. | Non-HTTP schemes, whitespace, control characters, and different hosts are excluded. |
| Normalize | Remove fragments, resolve dot segments, and optionally remove recognized tracking parameters. | Any cleanup marks an included row for review. |
| Annotate | Validate or fill lastmod, then apply per-line or global optional hints. | Invalid optional values are omitted or replaced according to policy. |
| Deduplicate and sort | Compare final normalized URLs, then preserve source order, sort by URL, or sort by path depth. | With deduplication enabled, later copies are excluded. |
| Serialize | Entity-escape every emitted value and write the XML document. | Entry count and UTF-8 byte size feed the publish checks. |
A fragment never identifies a separate sitemap URL and is always removed. Tracking cleanup recognizes common advertising and analytics keys; other query parameters remain untouched. Normalization does not determine whether two different URLs serve duplicate content.
Rule Core: Protocol and generator boundaries
| Item | Accepted boundary | Behavior |
|---|---|---|
| Source inventory | 1 to 4,194,304 characters | Blank or larger input is rejected before generation. |
loc | HTTP or HTTPS and at most 2,048 characters | The emitted URL is absolute and constrained to the chosen host. |
lastmod | YYYY-MM-DD or a full timestamp with timezone | Calendar dates, time fields, and offsets through ±14:00 are validated. |
priority | 0.0 to 1.0 inclusive | Valid values are serialized to one decimal place; Google ignores the field. |
changefreq | always, hourly, daily, weekly, monthly, yearly, or never | Invalid values use the selected fallback or are omitted. |
| URL count | At most 50,000 per sitemap | More than 50,000 changes the publish status to Split before publishing. |
| Uncompressed size | At most 52,428,800 bytes | A larger document must be split even if compressed transfer would be smaller. |
The smallest emitted entry has this structure:
<url>
<loc>ABSOLUTE-CANONICAL-URL</loc>
</url>
Including an XML schema location changes the root declaration only; it does not validate the document. URL order also does not change Google’s interpretation, though stable ordering can make reviews and version-control diffs easier to follow.
Worked Examples:
Tracking cleanup exposes one canonical row
Suppose the source contains /docs?utm_source=x#top and a second copy ending in #other. With tracking cleanup and deduplication enabled, both normalize to the chosen origin plus /docs. The first row is included with a review note and the second is excluded as a duplicate. A cross-host URL in the same list is excluded independently.
References:
- Sitemaps XML format, Sitemaps.org.
- Build and submit a sitemap, Google Search Central, July 8, 2026.
- How to create an XML sitemap for your website, Simplified Guide.