A valid XML sitemap in one paste
A sitemap lists the URLs you want search engines to discover and tells them how fresh and important each one is. This builder turns a plain list of URLs into a standards-compliant sitemap.xml with proper XML escaping, ready to copy or download.
How it works
The output follows the sitemaps.org 0.9 protocol. The root <urlset> carries the namespace http://www.sitemaps.org/schemas/sitemap/0.9. Each URL you enter becomes a <url> element containing a <loc> with the address. The builder then applies your chosen defaults as <lastmod>, <changefreq>, and <priority> children. Special characters in URLs (&, <, >, ', ") are escaped to their XML entities so the file always parses. Blank lines are ignored and the list is capped at the first 50 URLs.
Generated output example
Always use absolute URLs with the protocol, like https://example.com/page. A generated entry looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://example.com/</loc>
<lastmod>2026-06-06</lastmod>
<changefreq>weekly</changefreq>
<priority>1.0</priority>
</url>
</urlset>
Choosing the right settings
lastmod: Set this to the actual last-published or last-modified date for each page. Google pays attention to lastmod when deciding whether to recrawl a URL. A stale or inaccurate lastmod can cause crawl budget to be wasted on pages that have not changed, or important updates to be missed.
changefreq: This is a hint to crawlers, not a directive. Google has stated it largely ignores changefreq in favour of its own crawl signals. Reasonable values: daily for news or blog indexes, weekly for frequently updated product pages, monthly for static reference pages, yearly for archival content.
priority: A relative value from 0.0 to 1.0 indicating which pages on your site matter most to you. The default is 0.5. Priority only means something relative to other pages on your own site — setting everything to 1.0 is the same as setting everything to 0.5, and does not increase your ranking against other sites.
After you generate
- Save the file as
sitemap.xmland place it at your domain root (e.g.https://example.com/sitemap.xml). - Add a
Sitemap:directive to yourrobots.txt:Sitemap: https://example.com/sitemap.xml - Submit the URL in Google Search Console under Sitemaps, and in Bing Webmaster Tools.
- For sites over 50 URLs, generate several sitemaps and link them from a
<sitemapindex>file. The protocol allows up to 50,000 URLs and 50 MB per file.
Common mistakes to avoid
Relative URLs: Every <loc> must be an absolute URL including the scheme (https://). A relative path like /about is invalid XML sitemap syntax and will cause crawlers to skip the entry or reject the file.
Ampersands in URLs: If a URL contains a query string with &, it must be escaped to & in XML. This builder escapes special characters automatically, but if you hand-edit the file afterwards, an unescaped & will break XML parsing.
Stale lastmod: Updating lastmod without actually changing the page content trains Googlebot to distrust your dates. Only set lastmod to today’s date on pages that genuinely changed. On static pages that have not changed in months, leave lastmod set to the date of the last real change, or omit it entirely.
Listing URLs not in your domain: A sitemap at https://example.com/sitemap.xml may only list URLs that begin with https://example.com/. Cross-domain URLs are invalid in the same sitemap file.
Forgetting to resubmit after changes: Search Console caches your sitemap. If you update the file, resubmit the URL in the Sitemaps panel so Google re-fetches the latest version and does not crawl based on a stale copy.