Building and Using XML Sitemaps
Paste your URLs one per line — optionally with a changefreq and priority after each, comma separated — and this tool produces valid XML sitemap markup. Values are escaped correctly, defaults are filled in where you omit them, and the output updates as you type.
An XML sitemap is a file listing the URLs on your site that you want search engines to know about. It does not make pages rank, and it does not guarantee indexing. What it does is make discovery reliable, which matters more on some sites than others.
What a sitemap is actually for
Search engines find pages primarily by following links. A sitemap supplements that by handing over a list directly, which helps most where link discovery is weakest: new sites with few backlinks, large sites where some pages sit many clicks from the homepage, and sites with pages that are simply not well linked internally.
It is worth being clear about what a sitemap does not do. Listing a URL does not force indexing — Google decides that separately based on quality and duplication. Listing a URL does not improve its ranking. And a sitemap will not rescue a page that is blocked in robots.txt or carries a noindex tag.
If a page is not being indexed, a sitemap is rarely the fix. The more productive question is usually whether anything links to it, and whether it is distinct enough from your other pages to deserve its own entry in the index.
The tags and what they are worth
- loc — the full absolute URL. Required, and must be a URL you actually want indexed.
- lastmod — when the page last meaningfully changed. Google does use this, but only if it trusts it.
- changefreq — how often the page changes. Google has said it largely ignores this.
- priority — relative importance from 0.0 to 1.0. Also largely ignored by Google.
Why lastmod is the tag worth getting right
Of the optional tags, lastmod is the only one Google has confirmed it pays attention to — and only when the values are consistently accurate. It uses it as a hint about which pages are worth recrawling.
The catch is that trust is easily lost. Many CMS platforms stamp every URL with today's date on every sitemap regeneration, which makes the field meaningless. Once Google concludes your lastmod values are unreliable, it ignores them for the whole sitemap.
So either set lastmod accurately to the date content genuinely changed, or leave it out. An honest omission is better than a field that says everything changed this morning.
What to include and what to leave out
A sitemap should list the canonical, indexable version of each page you want in search. Everything else creates noise and, at scale, wastes crawl requests on URLs that will never be indexed.
- Include: canonical URLs returning HTTP 200 that you want indexed.
- Exclude: URLs that redirect — list the final destination instead. The Redirect Chain Checker will confirm where each one lands.
- Exclude: pages carrying noindex, or blocked in robots.txt. Listing them sends contradictory signals.
- Exclude: non-canonical duplicates. If a page canonicalises elsewhere, list the canonical.
- Exclude: thin pages you would not want a searcher to land on — tag archives, paginated duplicates, empty category pages.
Size limits and splitting
A single sitemap file can contain up to 50,000 URLs and must not exceed 50MB uncompressed. Beyond that you need multiple sitemap files listed in a sitemap index file, which is itself an XML file pointing at the others.
Splitting is useful below the limit too. Separate sitemaps for products, blog posts and static pages let you see indexing coverage per content type in Search Console, which turns a vague “some pages are not indexed” into a specific answer about which section has the problem.
Submitting and maintaining it
Upload the file to your site — the root, as /sitemap.xml, is conventional — then do two things. Add a Sitemap line to your robots.txt, which the Robots.txt Generator will produce for you, and submit the URL in Google Search Console so you get coverage reporting.
Search Console's sitemap report is the useful part of submitting. It tells you how many listed URLs were discovered and how many were actually indexed, and a large gap between those numbers is a real signal worth investigating.
Before generating, it is worth cleaning the URL list. The URL Deduplicator removes entries differing only by protocol, case or trailing slash, and the Bulk URL Formatter normalises them so you do not list two versions of the same page.
Frequently asked questions
Does a sitemap improve rankings?
No. A sitemap helps search engines discover URLs; it has no direct effect on where those URLs rank. Its value is in reliable discovery, which matters most for new, large, or poorly interlinked sites.
Do changefreq and priority matter?
Google has said it largely ignores both. Of the optional tags, only lastmod carries real weight, and only when the values are accurate. Setting every page to priority 1.0 achieves nothing.
How many URLs can one sitemap hold?
Up to 50,000 URLs and 50MB uncompressed. Beyond that, split into several files and reference them from a sitemap index. Splitting by content type is often useful well before you hit the limit.
Should I include pages that redirect?
No. List the final destination URL instead. Including redirecting URLs wastes crawl requests and sends a confusing signal about which version you consider canonical.
Where should the sitemap file live?
Anywhere on your domain, though the root as /sitemap.xml is the convention. Reference it from robots.txt and submit it in Search Console. A sitemap can only contain URLs from the site it is hosted on.