Free Sitemap XML Generator — Create sitemap.xml Instantly

Generate a valid sitemap.xml from your URLs

Generate Sitemap XML

Paste your URLs below (one per line) to generate a valid sitemap.xml file. Optionally add a date after each URL to set lastmod.

Format: URL or URL YYYY-MM-DD — add a space followed by an ISO date to set lastmod per URL.

Try an example:
0
URLs in sitemap
0 bytes 0 duplicates removed

Generated sitemap.xml

What Is a Sitemap XML File?

A sitemap.xml is an XML file that lists the URLs on your website you want search engines to crawl and index. It follows the Sitemaps protocol and helps Google, Bing, and other search engines discover your pages — especially new pages, recently updated pages, or pages buried deep in your site structure.

A sitemap does not guarantee indexing. It is a request, not a directive. Search engines decide independently what to crawl and index. But providing a sitemap removes a common barrier: discoverability.

When You Need a Sitemap

  • Large sites — 500+ pages where some may not be internally linked
  • New websites — Few external links pointing to your site yet
  • Frequently updated content — Blogs, news sites, product catalogs
  • JavaScript-rendered pages — Where crawlers might miss links
  • Pages with rich media — Images, videos that benefit from sitemap extensions

For small sites (under 50 pages) with good internal linking, a sitemap is optional but still considered best practice.

Sitemap XML Structure

A minimal valid sitemap contains a <urlset> element with one or more <url> entries. Each entry requires a <loc> tag with the full URL:

<?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-02-05</lastmod>
    <changefreq>weekly</changefreq>
    <priority>1.0</priority>
  </url>
</urlset>

Sitemap Tags Explained

TagRequiredDescription
<loc>YesFull URL of the page (must include protocol)
<lastmod>NoLast modification date in W3C datetime format (YYYY-MM-DD)
<changefreq>NoExpected change frequency: always, hourly, daily, weekly, monthly, yearly, never
<priority>NoRelative importance (0.0 to 1.0, default 0.5) — only meaningful within your own site

Note: Google has stated it largely ignores changefreq and priority. They can still be useful for other search engines and for your own documentation.

Limits and Constraints

  • 50,000 URLs maximum per sitemap file
  • 50 MB maximum uncompressed file size
  • For larger sites, use a sitemap index file that references multiple sitemaps
  • URLs must be from the same domain (or subdomain) as the sitemap
  • All URLs must use the same protocol (http or https)

How to Deploy Your Sitemap

  1. Generate — Paste your URLs above and download the file
  2. Upload — Place sitemap.xml in your website's root directory (https://yoursite.com/sitemap.xml)
  3. Reference in robots.txt — Add this line to your robots.txt:
    Sitemap: https://yoursite.com/sitemap.xml
  4. Submit to search engines — Submit via Google Search Console and Bing Webmaster Tools
  5. Verify — After a few days, check the coverage report in Search Console for errors

Privacy & Security

All processing happens in your browser. Your URLs are never sent to any server. The JavaScript runs locally on your device. You can verify this with your browser's network inspector — no data is transmitted when you generate or download the sitemap.

Frequently Asked Questions

What is a sitemap.xml file?

A sitemap.xml is an XML file that lists URLs on your website that you want search engines to crawl and index. It follows the Sitemaps protocol and helps search engines like Google and Bing discover pages — especially new or deeply nested ones that may not be found through regular crawling.

Does every website need a sitemap?

Not necessarily, but Google recommends them for sites with more than 500 pages, new sites with few external links, sites with many orphan pages, and sites updated frequently. For small, well-linked sites, a sitemap is optional but still good practice.

What is the maximum number of URLs in a sitemap?

A single sitemap can contain up to 50,000 URLs and must not exceed 50 MB uncompressed. For larger sites, split URLs across multiple sitemap files and reference them from a sitemap index file.

What does lastmod do?

The lastmod tag tells search engines when a page was last meaningfully updated, in W3C datetime format (e.g., 2026-02-05). Use it honestly — setting today's date on every page reduces its signal value.

Does Google use changefreq and priority?

Google has publicly stated it largely ignores both changefreq and priority. Other search engines may still use them as hints. The most useful optional tag is lastmod — if set accurately.

Where should I upload my sitemap?

Place it in your website's root directory so it's accessible at yoursite.com/sitemap.xml. Add a reference in your robots.txt file and submit it in Google Search Console and Bing Webmaster Tools.

Can I gzip my sitemap?

Yes. Search engines accept gzipped sitemaps (sitemap.xml.gz). This reduces file size, which helps with large sitemaps. Reference the .gz file in your robots.txt.

What is a sitemap index file?

A sitemap index lists multiple sitemap files using the <sitemapindex> tag instead of <urlset>. Each entry points to a sitemap file with an optional lastmod date. Required when your site exceeds 50,000 URLs or 50 MB per sitemap.

Should I include images or videos in my sitemap?

Google supports image and video sitemap extensions using additional XML namespaces. These let you include image URLs, captions, video thumbnails, and metadata alongside page URLs. Useful for media-heavy sites that want better visibility in image and video search.

Should trailing slashes be consistent?

Yes. example.com/about and example.com/about/ are technically different URLs. Pick one convention and use it consistently in your sitemap. This tool has a "trailing slash" option to enforce consistency.

Does this tool send my data to a server?

No. All processing runs in your browser using JavaScript. Your URLs are never uploaded or stored. You can verify this in your browser's network inspector.

How often should I update my sitemap?

Update it whenever you add, remove, or significantly change pages. Many CMS platforms and static site generators can auto-generate sitemaps on build. For dynamic sites, consider generating the sitemap automatically on a schedule.

Related Tools & Resources

Related Tools

View all tools

Sitemap XML Generator FAQ

What is a sitemap.xml file?

A sitemap.xml is an XML file that lists the URLs on a website you want search engines to crawl and index. It follows the Sitemaps protocol (sitemaps.org) and helps search engines like Google and Bing discover pages, especially new or deeply nested ones that may not be found through regular crawling.

How do I create a sitemap.xml?

Paste your URLs into a sitemap generator (one per line), optionally set lastmod dates and changefreq values, then download the generated XML file. Upload it to your website root (e.g., example.com/sitemap.xml) and reference it in your robots.txt file.

Does every website need a sitemap?

Not every website needs one, but Google recommends sitemaps for sites with more than 500 pages, sites with many orphan pages (not linked from other pages), new sites with few external links, and sites that use rich media or are updated frequently. For small sites with good internal linking, a sitemap is optional but still useful.

What is the maximum number of URLs in a sitemap?

A single sitemap.xml file can contain up to 50,000 URLs and must not exceed 50 MB when uncompressed. If your site has more URLs, you need to split them across multiple sitemap files and reference them from a sitemap index file.

What does the lastmod tag do?

The lastmod tag tells search engines when a page was last modified, using the W3C datetime format (e.g., 2026-02-05). Search engines use this as a hint for recrawl scheduling. Only set lastmod to the actual last-modified date — using today's date on every page reduces its usefulness.

What does changefreq mean in a sitemap?

The changefreq tag indicates how often a page is likely to change. Valid values are always, hourly, daily, weekly, monthly, yearly, and never. Note that Google has stated it largely ignores this field, but other search engines may still use it as a hint.

What does priority mean in a sitemap?

The priority tag is a value from 0.0 to 1.0 that suggests the relative importance of a URL compared to other URLs on the same site. The default is 0.5. This is a hint only — it does not affect how your pages rank in search results relative to pages on other sites. Google has said it largely ignores this field.

Where should I upload my sitemap.xml?

Place your sitemap.xml in the root directory of your website so it is accessible at example.com/sitemap.xml. Then add 'Sitemap: https://example.com/sitemap.xml' to your robots.txt file. You can also submit it directly in Google Search Console and Bing Webmaster Tools.

Does this tool upload my URLs to a server?

No. All processing happens in your browser using JavaScript. Your URLs are never sent to any server. You can verify this in your browser's network inspector.

What is a sitemap index file?

A sitemap index file lists multiple sitemap files. It uses the sitemapindex tag instead of urlset and references individual sitemap files with their location and optional lastmod date. This is required when your site has more than 50,000 URLs or your sitemap exceeds 50 MB.

Can I gzip my sitemap?

Yes. Search engines accept gzipped sitemaps (sitemap.xml.gz). Gzipping reduces file size, which is especially useful for large sitemaps. Reference the .gz file in your robots.txt and search console.

Should I include images or videos in my sitemap?

Google supports image and video sitemap extensions. These use additional XML namespaces to include image URLs, captions, video thumbnails, and other metadata alongside regular page URLs. This is useful for media-heavy sites that want better visibility in image and video search results.

Request a New Tool
Improve This Tool