Quick answer
An XML sitemap is a file listing the URLs you want search engines to crawl, with optional last-modified dates. Paste URLs or a CSV export into Playxoft's free XML sitemap generator to get a valid sitemap.xml: URLs are normalized, deduplicated and escaped, hreflang alternates come from language columns, and more than 50,000 URLs are split into files plus a sitemap index. Validate mode checks an existing sitemap.
- List or CSV input
- Lastmod in W3C Datetime
- hreflang alternates
- Auto split and index
- Dedupe and escaping
- Sitemap validator
- Download each file
How to use the XML Sitemap Generator
- 1Paste your URLs into URLs, one per line, or Open a .txt or .csv export. A date after a URL becomes its lastmod.
- 2Set Site URL so relative paths such as /about work, and choose how Lastmod is filled.
- 3For translated pages, use a CSV header with language codes such as en, de and x-default.
- 4Review Checks, then Download sitemap.xml, or each split file and sitemap-index.xml.
- 5Upload the file to your site's root, add a Sitemap line to robots.txt and submit it in Search Console.
- 6To check an existing sitemap, switch to Validate and paste its XML.
What does a valid XML sitemap look like?
The Sitemaps protocol is short. A sitemap is a UTF-8 XML file with a <urlset> root in the sitemaps.org namespace and one <url> per page, each with a required <loc>:
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://example.com/search?q=shoes&sort=new</loc>
<lastmod>2026-10-01</lastmod>
</url>
</urlset>| Rule | Limit |
|---|---|
| URLs per file | 50,000 |
| File size | 50 MB (52,428,800 bytes) uncompressed |
| URL length | Fewer than 2,048 characters |
| URL form | Absolute, with http:// or https:// |
| Hosts | One host per file |
| Escaping | & < > " ' as & < > " ' |
The namespace is an identifier, not a link, so it must be exactly http://www.sitemaps.org/schemas/sitemap/0.9; the https:// version is a common mistake. An unescaped & in a query string makes the whole file invalid XML. The generator escapes every value, removes #fragments (crawlers ignore them), percent-encodes spaces and accents, and lists each URL once.
Do lastmod, changefreq and priority matter?
Only <lastmod> does, for Google. Google says it ignores <priority> and <changefreq>, and uses <lastmod> when it is consistently and verifiably accurate. Set it to the date of the last significant change to the page's content, not the day you generated the sitemap; a footer copyright update doesn't count.
Dates use W3C Datetime:
2026-10-14 date only (most common)
2026-10-14T09:30+02:00 with time: minutes and a time zone
2026-10-14T07:30:00Z seconds, in UTCA time always needs a time zone, and formats such as 14/10/2026 are invalid. When a CMS export has times without a zone (2026-10-14 09:30:00), the generator keeps only the date rather than guess the offset.
How do I add hreflang to a sitemap?
List every language version of a page inside each version's <url> entry, including itself, with <xhtml:link> and the xhtml namespace. Google's rules say links that don't point at each other are ignored, so every version must list every other version.
In the generator, give your CSV a header of language codes; each row becomes one page in several languages:
en,de,x-default,lastmod
https://example.com/,https://example.com/de/,https://example.com/,2026-10-01Codes are an ISO 639-1 language, optionally a region from ISO 3166-1 alpha-2 (de-CH), or x-default for the fallback page. Two classic mistakes are caught: en-UK (the code is GB) and numeric regions such as es-419, which Google doesn't support.
What if my site has more than 50,000 URLs?
Split the URLs into several sitemaps and list them in a sitemap index, which has the same limits. The generator does it automatically, at 50,000 URLs or 50 MB per file:
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap>
<loc>https://example.com/sitemap-1.xml</loc>
<lastmod>2026-10-14</lastmod>
</sitemap>
</sitemapindex>Google requires the listed sitemaps to sit on the same site as the index, in its folder or below it. Upload every file, then submit only sitemap-index.xml. In an index, <lastmod> is when that sitemap file changed, not its pages.
Which URLs belong in a sitemap?
Only the canonical URLs you want in search results: pages that return 200, aren't redirects, aren't marked noindex and aren't blocked in robots.txt. Listing duplicates, filtered views or tracking variants (?utm_source=…) wastes crawling and sends mixed signals.
A sitemap at the root covers the whole site. Tell search engines where it is with a Sitemap: line in robots.txt (the robots.txt generator writes it) and by submitting it in Google Search Console and Bing Webmaster Tools.
Frequently asked questions
Last updated by the Playxoft engineering team.