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.
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.
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.
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.
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, SitemapsHow 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.
-
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.
-
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. -
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.
-
Publish the file in the root directory
Save the file as
sitemap.xmlin 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. -
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.
Sitemap file examples
A minimal file, a sitemap index and how to write special characters in a URL.
<?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.
<?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.
<loc>https://example.com/shop?color=black&size=m</loc><loc>https://example.com/shop?color=black&size=m</loc>Sitemaps.org requires entity escaping for &, quotes and angle brackets. The generator does this for you.
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.xmlcovers 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.
Sitemap limits and rules from the protocol and Google
| Value | What it means | Source |
|---|---|---|
| 50,000 | Maximum number of URLs in one sitemap file. The second limit is 50 MB (52,428,800 bytes) uncompressed. | sitemaps.org, protocol |
| 50,000 | Maximum number of sitemap files in one index. The index itself is also capped at 50 MB. | sitemaps.org, protocol |
| 500 | Number of sitemap index files you can submit per site in Search Console. | Google Search Central, large sitemaps |
| 2,048 | A URL in <loc> must be shorter than 2,048 characters. | sitemaps.org, protocol |
| UTF-8 | Required encoding for sitemap and sitemap index files. | Google Search Central, build a sitemap |
| Weak signal | Google describes a URL in a sitemap as a weak canonicalization signal, weaker than redirects and rel="canonical". | Google Search Central, duplicate URLs |
Sources checked:
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.
Paste your URL list, one per line, optionally with a lastmod date after a space. The tool validates the entries and builds a file matching the sitemaps.org schema, ready to save as sitemap.xml at your site root.
No. It runs locally in your browser and fetches nothing from your server, so it cannot discover URLs for you. It works from the list you paste, and a full site crawl is what the Crawl module in Insight is for.
There is no need. Google states it ignores both fields, so this generator does not emit them. A truthful lastmod is the field worth having.
50,000 URLs or 50 MB uncompressed, whichever comes first. For a larger site, split the file and list the parts in a sitemap index.
Not necessarily. A sitemap helps a URL be discovered, but indexing remains the search engine’s decision and depends on quality and on the consistency of your other signals.
The sitemap.xml file belongs in the root of the domain, for example https://example.com/sitemap.xml. Google recommends the root because a file in a subdirectory covers only URLs in that subdirectory, unless you submit it in Search Console.
You submit a sitemap in the Sitemaps report in Search Console, or add a Sitemap: line with the full file URL to robots.txt. Submission is a hint, and Google decides on its own which URLs to crawl.
A sitemap under the sitemaps.org protocol lists URLs on the same host and protocol as the file. Google allows an exception for cross-site submission, when you verify ownership in Search Console of every site whose URLs the file lists.
What else might come in handy
File or code ready? Check the result on the live page
Indexability, metadata and structure, with priorities and a client report.