DevTools Pro · All tools · About

XML Sitemap Generator

About the XML Sitemap Generator

This XML sitemap generator turns a list of paths or full URLs into a valid sitemap.xml that follows the sitemaps.org 0.9 protocol. Each URL is resolved against your base URL, percent-encoded and XML-escaped, and duplicates are skipped, so the file passes validation in Google Search Console and Bing Webmaster Tools.

What is an XML sitemap?

A sitemap is a file that lists the URLs you want search engines to crawl. Each entry is a <url> element with a required <loc> and optional <lastmod>, <changefreq> and <priority>, all wrapped in a <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> root.

Sitemaps help most on large sites, new sites with few backlinks and pages that are poorly linked internally. They do not guarantee indexing; they are a hint about which URLs exist and when they changed.

Sitemap rules and limits

One sitemap file may contain at most 50,000 URLs and be at most 50 MB uncompressed. Larger sites split URLs across several files and list them in a sitemap index.

Every <loc> must be an absolute URL on the same host as the sitemap. A sitemap at https://example.com/sitemap.xml cannot list https://shop.example.com/ pages. Special characters must be escaped, so ?color=red&size=9 becomes ?color=red&amp;size=9 inside the XML.

<lastmod> uses the W3C Datetime format. The date form 2026-10-02 is enough for most sites.

Do changefreq and priority still matter?

Google has said it ignores <changefreq> and <priority>, and uses <lastmod> only when it is consistently accurate. Bing and other engines may still read them. This tool lets you set each one per URL or choose (omit) to leave it out.

An accurate <lastmod> is the most useful optional field. Update it when the main content changes, not on every deploy.

How to Use the XML Sitemap Generator

  1. Enter your site's Base URL, for example https://example.com, or click Load example for a sample list.
  2. Paste paths or full URLs, one per line, into Add many URLs and click Add URLs (or press Ctrl/Cmd+Enter), or use Add common pages and the + button. Then set Change frequency, Priority and Last modified for each URL, or choose (omit) to leave a field out.
  3. Check the warnings box for duplicate or cross-host URLs, click Copy or Download, and upload sitemap.xml to your site root. Clear removes all URLs.

XML Sitemap Generator Examples

Five pages from a pasted list

Untick Include last modification dates for a stable result. URLs added in bulk start with Change frequency weekly and Priority 0.8. The space becomes %20 and the & is escaped.

Input:

Base URL: https://example.com
Add many URLs:
/
/pricing
/blog/hello world
/search?q=a&b=1
https://example.com/docs/intro

Output:

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://example.com/</loc>
    <changefreq>weekly</changefreq>
    <priority>0.8</priority>
  </url>
  <url>
    <loc>https://example.com/pricing</loc>
    <changefreq>weekly</changefreq>
    <priority>0.8</priority>
  </url>
  <url>
    <loc>https://example.com/blog/hello%20world</loc>
    <changefreq>weekly</changefreq>
    <priority>0.8</priority>
  </url>
  <url>
    <loc>https://example.com/search?q=a&amp;b=1</loc>
    <changefreq>weekly</changefreq>
    <priority>0.8</priority>
  </url>
  <url>
    <loc>https://example.com/docs/intro</loc>
    <changefreq>weekly</changefreq>
    <priority>0.8</priority>
  </url>
</urlset>

Warnings for a different host and a duplicate

The other-host URL stays in the XML but is flagged; the repeated /a is dropped. /a/ counts as a different URL from /a.

Input:

Base URL: https://example.com
Add many URLs:
/a
/a/
https://shop.example.com/x
/a

Output:

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://example.com/a</loc>
    <changefreq>weekly</changefreq>
    <priority>0.8</priority>
  </url>
  <url>
    <loc>https://example.com/a/</loc>
    <changefreq>weekly</changefreq>
    <priority>0.8</priority>
  </url>
  <url>
    <loc>https://shop.example.com/x</loc>
    <changefreq>weekly</changefreq>
    <priority>0.8</priority>
  </url>
</urlset>

Common Errors

The sitemap box stays empty and the warning says the Base URL must be an absolute http(s) URL.
Include the scheme: https://example.com, not example.com.
A warning says a URL is on a different host than the base URL.
Search engines ignore sitemap URLs on another host. The URL is still written to the XML, so remove it, or publish a separate sitemap on that host.
A URL is reported as a duplicate and skipped.
The same address appears twice after resolving against the base URL. Remove one. Note that /a and /a/ are different addresses and are both kept.
The <lastmod> dates are all today.
New entries default to today's date. Edit Last modified per URL, or untick Include last modification dates to leave the tag out.

Frequently Asked Questions

Where should I upload sitemap.xml?
Usually at the site root, for example https://example.com/sitemap.xml. A sitemap only covers URLs at or below its own directory, so the root is the safest place.
How do search engines find my sitemap?
Submit it in Google Search Console and Bing Webmaster Tools, and add a Sitemap: https://example.com/sitemap.xml line to your robots.txt.
How many URLs can a sitemap contain?
Up to 50,000 URLs and 50 MB uncompressed per file. Beyond that, split the URLs into several sitemaps and list them in a sitemap index file.
Should I include noindex or redirected pages?
No. List only canonical URLs that return 200 OK and that you want indexed. Redirects, error pages and noindex pages send mixed signals.
Why does the generator skip some of my URLs?
Entries that cannot be parsed as an http or https URL and exact duplicates are left out. URLs on another host are kept but flagged. The warnings box above the XML lists each one.

Related tools