Skip to content
SocialTools

XML Sitemap Generator

Turn a list of canonical, live URLs into sitemap.xml. Do not include noindex pages, redirects, or parameterized junk URLs.

SEO ToolsSEOReviewed 2026-09-11 by SocialTools editorial. How we test

3 URLs in sitemap

sitemap.xml
<?xml version="1.0" encoding="UTF-8"?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <url> <loc>https://example.com/</loc> <changefreq>weekly</changefreq> <priority>0.8</priority> </url> <url> <loc>https://example.com/about</loc> <changefreq>weekly</changefreq> <priority>0.8</priority> </url> <url> <loc>https://example.com/contact</loc> <changefreq>weekly</changefreq> <priority>0.8</priority> </url> </urlset>

Runs in your browser. Nothing you enter is uploaded.

Overview

An XML sitemap is a machine-readable list of the URLs you want search engines to know about. This generator takes one URL per line and wraps them in a valid urlset document, with optional changefreq and priority values applied uniformly, ready to copy or download as sitemap.xml.

A sitemap is a discovery aid, not an instruction. Listing a URL asks a crawler to consider it; it does not guarantee crawling, and it certainly does not guarantee indexing. The pages that benefit most are the ones internal linking has orphaned - a new section, a deep archive, or content that only appears behind a filter.

Which URLs belong in the file

Include only canonical, indexable, self-consistent URLs that return a 200 status. Every entry should be a page you would be happy to see in search results tomorrow. A sitemap full of redirects, 404s, and noindexed pages sends a muddled signal about which URLs you actually stand behind, and Search Console will report the mismatch back to you as coverage warnings.

The most common contamination is protocol and host inconsistency. If your canonical is https://example.com/page but the sitemap lists http://www.example.com/page, you have listed a URL that redirects. Pick the exact form your canonical tags declare and use it for every line.

  • Include: canonical URLs returning 200 that you want indexed.
  • Exclude: noindexed pages, redirect sources, parameterised duplicates, and paginated series beyond page one unless each page is genuinely distinct.
  • Exclude: URLs blocked in robots.txt - listing what you have told crawlers to skip is contradictory.
  • Keep protocol, subdomain, and trailing-slash style identical to your canonical tags.

What changefreq and priority are actually worth

Both fields are part of the sitemaps.org specification and both are, in practice, close to ignored by major search engines. Google has stated that it disregards priority and treats changefreq as at most a weak hint. They remain in the spec, other consumers of sitemaps sometimes read them, and including them costs nothing - which is why this generator offers them as optional dropdowns rather than requiring them.

What does carry weight is lastmod, when it is honest. A lastmod date that reflects a real content change helps crawlers prioritise re-fetching. A lastmod that updates every night because a template changed teaches crawlers to ignore the field. This generator does not emit lastmod for exactly that reason: a single date applied to every URL in a bulk-generated file would be inaccurate on most of them.

How the XML is assembled and escaped

Each line of input is trimmed and empty lines are discarded, so a pasted list with blank separators produces clean output. Every surviving line becomes a <url> element containing a <loc> child, followed by <changefreq> and <priority> children only if you selected values for them. Setting either dropdown to None omits that element entirely rather than writing an empty tag.

URL text is XML-escaped before insertion: ampersands, angle brackets, double quotes, and apostrophes are replaced with their entity equivalents. This matters for any URL carrying query parameters, because a raw & inside a <loc> element makes the whole document malformed and search engines will reject the file rather than skip the bad line.

The document is emitted with an XML declaration specifying UTF-8 and a urlset element carrying the sitemaps.org 0.9 namespace. The URL counter above the output reflects the number of non-empty lines, which is the quickest way to confirm that a paste from a spreadsheet came through intact.

Three URLs, one with a query string

Input

https://example.com/
https://example.com/guides?sort=new&page=2

https://example.com/contact
Change frequency: weekly · Priority: 0.8

Output

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://example.com/</loc>
    <changefreq>weekly</changefreq>
    <priority>0.8</priority>
  </url>
  <url>
    <loc>https://example.com/guides?sort=new&amp;page=2</loc>
    <changefreq>weekly</changefreq>
    <priority>0.8</priority>
  </url>
  <url>
    <loc>https://example.com/contact</loc>
    <changefreq>weekly</changefreq>
    <priority>0.8</priority>
  </url>
</urlset>

The blank line was dropped and the ampersand in the second URL became &amp;, which is what keeps the document parseable. Worth noticing in passing: a sorted, paginated listing URL is usually a poor sitemap candidate - it is the kind of entry that belongs in a canonical review before it belongs in a sitemap.

Limitations

  • A single sitemap file may contain at most 50,000 URLs and must stay under 50 MB uncompressed. Larger sites need multiple files referenced from a sitemap index, which this tool does not build.
  • No lastmod element is emitted, because a bulk-applied date would be wrong for most URLs and an inaccurate lastmod is worse than none.
  • changefreq and priority are applied uniformly to every URL. Per-URL values require editing the output by hand.
  • The generator does not fetch or validate your URLs. Typos, redirects, and 404s pass through unchecked.
  • Image, video, and news sitemap extensions are not supported - this produces a standard urlset only.

When not to use this tool

  • If your CMS or framework already generates a sitemap dynamically, keep that one. A hand-maintained file goes stale the moment someone publishes without updating it.
  • For a site of a dozen well-linked pages, a sitemap adds little. Fixing internal navigation so every page is reachable in two or three clicks does more for discovery.

How to use it

  1. 1

    Paste your canonical URLs one per line, matching the exact protocol, subdomain, and trailing-slash style your canonical tags use.

  2. 2

    Choose a changefreq and priority only if a downstream consumer needs them; set both to None for a minimal, honest file.

  3. 3

    Check the URL count shown above the output against the number of pages you expected, then download sitemap.xml.

  4. 4

    Upload the file to your domain root and reference it from robots.txt with a Sitemap line, then submit it in Search Console to get coverage reporting.

Questions

Will adding a page to my sitemap get it indexed?

It helps a crawler find the URL, and that is all. Indexing depends on whether the page is crawlable, canonical, and judged worth storing. Pages that were already discoverable through internal links gain almost nothing from being listed.

How often should I regenerate the file?

Whenever the set of indexable URLs changes materially - a batch of new articles, a section removed, a URL structure migration. Regenerating on a schedule when nothing has changed accomplishes nothing, since resubmission does not reset any crawl priority.

Do I have to submit it in Search Console?

Not strictly. Referencing it from robots.txt with a Sitemap directive is enough for discovery. Submitting it in Search Console is still worth doing because you get a per-sitemap coverage report showing how many of the listed URLs were indexed and why the others were not.

Can I include URLs from a different domain?

Only if you have verified ownership of both in Search Console - otherwise cross-domain entries are ignored. In normal use, keep each sitemap to the host it is served from.