Menu

XML Sitemap Generator

Purpose: Turn a plain list of page URLs into a valid sitemap.xml you can submit to search engines.


  

XML Sitemap Generator: How It Works

An XML sitemap is a list of the URLs you want indexed, offered directly to search engines rather than left to be discovered through links. It does not force indexing, but it removes discovery as an excuse — particularly for large sites, new sites, and pages that few internal links point to.

The format

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://example.com/guides/espresso</loc>
    <lastmod>2026-08-02</lastmod>
    <changefreq>monthly</changefreq>
    <priority>0.8</priority>
  </url>
</urlset>
ElementRequiredDoes it matter?
locYesMust be absolute and canonical
lastmodNoYes — Google uses it when it is accurate
changefreqNoIgnored by Google
priorityNoIgnored by Google

Two of the four fields do nothing at Google. lastmod is the exception and is genuinely used — but only if it is honest. Sites that stamp every URL with today's date teach search engines to ignore the field entirely, which loses a real signal for no gain.

What belongs in it

Only canonical, indexable, 200-status URLs. Every one of the following is a mistake:

Each contradiction weakens the sitemap's credibility as a whole. A sitemap saying 'index this' alongside a page saying 'do not index me' is a mixed signal, and Search Console reports it as an error.

Limits and splitting

One sitemap holds up to 50,000 URLs or 50 MB uncompressed. Beyond that, split into multiple files and reference them from a sitemap index. Splitting by content type — products, categories, articles — is worth doing well below the limit, because Search Console reports indexing statistics per sitemap, letting you see which section of the site has a problem.

Submitting it

  1. Reference it in robots.txt: Sitemap: https://example.com/sitemap.xml.
  2. Submit it in Google Search Console and Bing Webmaster Tools.
  3. Keep it updated automatically — a stale hand-maintained sitemap is worse than none.

What it will not do

Submitting a URL does not guarantee indexing. Google evaluates whether a page is worth including, and pages judged thin, duplicative or low-value are commonly crawled and then excluded. If Search Console reports 'Discovered — currently not indexed' or 'Crawled — currently not indexed' across many URLs, the sitemap is working and the content is the problem. Adding more URLs will not fix that.

Specialised sitemaps

Image, video and news sitemaps carry extra metadata for those content types. They are worth the effort if images or video are central to your site's search visibility, and unnecessary otherwise. An hreflang sitemap is an alternative to per-page hreflang tags for multilingual sites, and is often easier to maintain at scale.

Frequently Asked Questions

Does a sitemap improve rankings?
No. It helps discovery, which matters for new sites, very large sites, and pages with few internal links. Discovery is a prerequisite for ranking, not a contributor to it.
Do priority and changefreq do anything?
Not at Google — both are ignored. Only loc and lastmod carry weight, and lastmod only when it is accurate. Stamping every URL with today's date makes the field worthless.
Should I include every page?
Only canonical, indexable, 200-status pages you want in search. Redirects, noindex pages, error pages and non-canonical duplicates should all be excluded, because each one contradicts the sitemap's purpose.
How many URLs can one sitemap hold?
50,000 URLs or 50 MB uncompressed, whichever comes first. Beyond that use a sitemap index pointing to several files — and splitting by content type is useful well before you reach the limit, because reporting is per sitemap.
My pages are in the sitemap but not indexed — why?
Submission does not guarantee indexing. 'Crawled — currently not indexed' generally means Google found the page and judged it not worth including, usually because it is thin, duplicative or low-value. That is a content problem, not a sitemap problem.
How often should the sitemap update?
Automatically, whenever content changes. Generating it dynamically means it is always accurate; a manually maintained file drifts out of date and starts making false claims.

Related SEO Tools

Browse all SEO tools →