Technical SEO

How to Create and Submit an XML Sitemap

A sitemap is your site’s list of URLs for crawlers. Used well it speeds up discovery and surfaces important pages; used badly it wastes crawl budget.

Updated 16 September 2026 · 7 min read
Advertisement

What an XML sitemap does

An XML sitemap lists the URLs you want search engines to know about, optionally with a last-modified date, change frequency and priority. It is a hint, not a guarantee: crawlers still decide what to fetch and index.

What to include — and exclude

Include: canonical, indexable pages that return HTTP 200.

Exclude:

  • Redirects (3xx) and errors (4xx/5xx)
  • noindex pages
  • Duplicate or parameterised URLs
  • Pages blocked in robots.txt

A sitemap full of non-canonical URLs wastes crawl budget and dilutes signals.

Structure and size limits

  • A single sitemap may contain up to 50,000 URLs and be 50 MB uncompressed.
  • Beyond that, use a sitemap index that references multiple sitemaps.
  • Only absolute URLs are valid.
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://example.com/page</loc>
    <lastmod>2026-09-16</lastmod>
  </url>
</urlset>

Generate one with the free XML sitemap generator.

Submit it the right way

  1. Add a Sitemap: line to robots.txt.
  2. In Google Search Console → Sitemaps, submit your sitemap URL.
  3. In Bing Webmaster Tools, do the same.
  4. Keep lastmod accurate — stale dates reduce trust.

Best practices

  • One canonical URL per page. No duplicates.
  • Update lastmod only when content really changes.
  • Split by content type (pages, products, blog) for clearer reporting.
  • Verify status codes. A sitemap pointing at 404s is worse than none — audit with the HTTP status checker.
  • Reference it in robots.txt so every crawler finds it.

Common mistakes

  1. Listing redirected or noindex URLs.
  2. Forgetting the sitemap after a site migration.
  3. Using relative URLs.
  4. Including thousands of low-value pages.
  5. Never updating lastmod.

Generate and submit

Create a clean sitemap with the XML sitemap generator, then submit it in Search Console — it takes two minutes.

Advertisement
Help Center

How to Create and Submit an XML Sitemap — FAQ

Small, well-linked sites can manage without one, but sitemaps help any site by speeding up discovery of new and updated pages. They are essential for large or frequently changing sites.

Canonical, indexable, 200-status URLs only. Exclude redirects, 404s, noindex pages, duplicate URLs and paginated fragments you do not want indexed.

Reference it in robots.txt and add it in Google Search Console (Sitemaps) and Bing Webmaster Tools. Both also accept the sitemap URL directly.

Keep reading

cta.title

cta.text

cta.button
100% Free No signup Private & secure
Advertisement