Skip to main content
Free tool

Sitemap generator

Paste your page URLs, review errors and download sitemap.xml. You can also check an existing file.

  • Free
  • No account required

One URL per line. Optionally a lastmod date after a space. You can also paste an existing sitemap.xml to validate it.

Validation

Paste your URL list

One URL per line. Validation and generation run locally and nothing is uploaded.

sitemap.xml

The file leaves out changefreq and priority, because Google ignores both. A truthful lastmod is what counts.

sitemap.xml

The file appears once you paste your URLs…

This sitemap generator turns a pasted URL list into a sitemap.xml that satisfies the sitemaps.org schema. It checks absolute URLs, duplicates, fragments, lastmod format and the 50,000-URL limit per file. It does not crawl your site. It works from the list you supply, and it also validates an existing sitemap you paste in.

About the tool

What a sitemap actually does

A sitemap helps URL discovery; it does not force indexing. Being in the file guarantees neither that a page enters the index nor that it ranks higher.

A URL in a sitemap should be canonical and return 200. Entries pointing at redirects, 404s or noindex pages contradict the rest of the site.

lastmod only means anything when it is true. Stamping the deploy date across every URL makes the signal worthless.

One file holds 50,000 URLs and 50 MB uncompressed. Beyond that you need a sitemap index pointing at several files.

In practice

Start with the intended destination URLs

Include pages intended for indexing in their canonical form. Remove tracking parameters, redirects and deleted pages. The generator processes your list; it does not verify the HTTP response or content of those pages.

Google Search Central, Sitemaps
Step by step

How to create a sitemap.xml for a website

You build a sitemap.xml from the list of canonical URLs you want indexed. Five steps take you from that list to a file submitted in Search Console.

  1. Prepare a list of canonical URLs

    Export URLs from your CMS or a crawler and keep only those that return 200, have no noindex and carry a canonical to themselves. Remove redirects and error pages from the list.

  2. Add real lastmod dates

    Put the date after a space in W3C Datetime format, such as 2026-10-26. Google uses lastmod only when it matches the last significant change to the content, structured data or links on the page.

  3. Paste the list and review the validation

    The generator above checks absolute URLs, duplicates, # fragments, the lastmod format and the 50,000 URL limit per file. When the list exceeds the limit, it shows how many files you need.

  4. Publish the file in the root directory

    Save the file as sitemap.xml in the root of the domain. According to sitemaps.org, a file can list only URLs on the same host and protocol, in its own directory or below it.

  5. Submit the sitemap to search engines

    Add a Sitemap: line with the full file URL to robots.txt and submit it in the Sitemaps report in Search Console. The report shows when Google fetched the file and whether it found errors.

Examples

Sitemap file examples

A minimal file, a sitemap index and how to write special characters in a URL.

Minimal sitemap.xml
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://example.com/pricing</loc>
    <lastmod>2026-10-26</lastmod>
  </url>
</urlset>

The generator above produces the same layout, without changefreq and priority.

Sitemap index for a large site
<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <sitemap>
    <loc>https://example.com/sitemap-products.xml</loc>
  </sitemap>
  <sitemap>
    <loc>https://example.com/sitemap-blog.xml</loc>
  </sitemap>
</sitemapindex>

An index lists up to 50,000 sitemap files hosted on the same site. An index lets you submit many sitemaps at once.

Ampersand in a URL
Before
<loc>https://example.com/shop?color=black&size=m</loc>
After
<loc>https://example.com/shop?color=black&amp;size=m</loc>

Sitemaps.org requires entity escaping for &, quotes and angle brackets. The generator does this for you.

Common mistakes

Common sitemap.xml mistakes

  • Redirects and noindex pages in the file

    Google treats every URL in a sitemap as a suggested canonical. An entry that leads to a redirect or a noindex page contradicts that suggestion.

  • The same lastmod on every URL

    A deployment date stamped on every URL stops saying anything about changes. Google uses lastmod only when it is consistently accurate against real changes to the page.

  • A file in a subdirectory listing the whole site

    Under the protocol, a file at /blog/sitemap.xml covers only URLs in /blog/. Google accepts a wider scope only when you submit the file in Search Console.

  • Relative URLs

    The <loc> element needs a full URL with protocol and host. Google recommends fully qualified URLs.

  • An old sitemap after a migration

    After a URL change, Google recommends updating sitemaps to the new URLs, submitting the new one in Search Console and removing the old one.

Numbers and sources

Sitemap limits and rules from the protocol and Google

ValueWhat it meansSource
50,000Maximum number of URLs in one sitemap file. The second limit is 50 MB (52,428,800 bytes) uncompressed.sitemaps.org, protocol
50,000Maximum number of sitemap files in one index. The index itself is also capped at 50 MB.sitemaps.org, protocol
500Number of sitemap index files you can submit per site in Search Console.Google Search Central, large sitemaps
2,048A URL in <loc> must be shorter than 2,048 characters.sitemaps.org, protocol
UTF-8Required encoding for sitemap and sitemap index files.Google Search Central, build a sitemap
Weak signalGoogle describes a URL in a sitemap as a weak canonicalization signal, weaker than redirects and rel="canonical".Google Search Central, duplicate URLs

Sources checked:

Glossary

Parts of the file

locURL
A complete, absolute URL. At most 2048 characters, ampersands escaped. Skip the fragment (#), it adds nothing, crawlers ignore it.
lmlastmod
The date the content last changed, in W3C Datetime. Optional, but it has to be true.
50kFile limit
50,000 URLs or 50 MB uncompressed, whichever comes first.
idxSitemap index
A file pointing at other sitemaps when one file is not enough.
SEO module in Insight

File or code ready? Check the result on the live page

Indexability, metadata and structure, with priorities and a client report.