SEO

How to Create and Submit an XML Sitemap

What belongs in a sitemap, common mistakes, and how Google actually uses it.

TL;DR

An XML sitemap lists the URLs you want search engines to know about — a discovery aid, not a ranking guarantee. A single file caps at 50,000 URLs and roughly 50MB uncompressed; larger sites split into multiple files referenced by a sitemap index. The priority and changefreq tags are largely ignored by Google today, which relies on its own crawl signals instead of self-reported values.

On this page
  1. What a sitemap is for
  2. What belongs inside a sitemap file
  3. The size limits
  4. A common myth: priority and changefreq
  5. Sitemap vs other discovery methods
  6. Generate and submit your sitemap
  7. Common pitfalls and best practices
  8. FAQ

What a sitemap is for

An XML sitemap lists the URLs on your site you want search engines to know about, along with optional metadata like last-modified date and priority. It doesn't force Google to rank or even index every URL — it's a discovery aid, not a guarantee, especially useful for large sites or pages with few internal links pointing to them, where a crawler might otherwise take a long time to find a URL organically.

For a small, well-linked site, a sitemap matters less, since crawlers can usually discover every page just by following internal links. Its value scales with site size and with how "hidden" certain pages are within the site's link structure.

What belongs inside a sitemap file

Each URL entry can include a <loc> tag (the URL itself, required), a <lastmod> tag (when the page was last meaningfully updated), and the largely-ignored <priority> and <changefreq> tags. Only include URLs you actually want indexed — canonical, indexable pages, not duplicates, redirects, or pages blocked by robots.txt or a noindex tag, since including those sends a contradictory signal to search engines.

A sitemap should also stay in sync with what actually exists on the site — stale entries pointing to deleted or moved pages waste crawl budget and can make Search Console's coverage reports harder to interpret accurately.

The size limits

A single sitemap file is capped at 50,000 URLs and roughly 50MB uncompressed. Sites larger than that split into multiple sitemap files referenced by one sitemap index file, which is exactly the segmented structure larger sites use in practice — separate files for products, blog posts, categories, and so on, all listed inside a single index.

Splitting by content type, rather than arbitrarily by URL count, also makes it easier to track indexing coverage separately for each section in Search Console — a drop in indexed product pages is easier to spot when products have their own dedicated sitemap file.

A common myth: priority and changefreq

The priority and changefreq tags are largely ignored by Google today — the search engine relies on its own crawl signals (actual observed update frequency, internal link structure, historical crawl data) rather than trusting a site's self-reported priority values. Including them doesn't hurt, but don't expect them to meaningfully change crawl behavior or crawl frequency.

This wasn't always fully the case — priority and changefreq carried somewhat more weight in search engines' earlier crawling algorithms. Their diminished influence today is a reminder that sitemap best practices evolve, and it's worth periodically checking current guidance rather than assuming old advice still applies exactly as written.

Sitemap vs other discovery methods

How search engines find your pages
MethodReliabilityBest for
XML sitemapHigh for listed URLsLarge sites, pages with few internal links
Internal linkingHigh if links existWell-connected, smaller sites
External backlinksVariablePages linked to from other sites
Manual URL submission (Search Console)High but not scalableA single new or updated page needing fast discovery

Generate and submit your sitemap

  1. Generate your sitemap.xml with the Sitemap Generator.
  2. Upload it to your site's root directory.
  3. Submit the URL in Google Search Console under Sitemaps.

Common pitfalls and best practices

  • Including noindexed or blocked pages. Listing a page in the sitemap while also blocking it via robots.txt or a noindex tag sends a contradictory signal — keep the two consistent.
  • Forgetting to update the sitemap after a redesign. A stale sitemap pointing at old URLs after a site restructure wastes crawl budget and can confuse Search Console's coverage reporting.
  • Not referencing the sitemap in robots.txt. Adding a Sitemap: line to robots.txt gives crawlers an additional, reliable way to find it, alongside direct Search Console submission.
  • Assuming a sitemap fixes deeper crawlability problems. A sitemap helps with discovery, but it can't compensate for genuinely thin content, broken internal linking, or pages blocked elsewhere — those need to be fixed at the source.

Frequently Asked Questions

No — a sitemap is a discovery aid that helps search engines find your URLs faster, but indexing decisions depend on many other factors like content quality, crawl budget, and whether the page is worth indexing at all.
No — only include canonical, indexable pages you actually want in search results. Excluding duplicate pages, redirects, and noindexed pages keeps the sitemap's signal clean and consistent with your other SEO signals.
Largely no — Google today relies on its own crawl signals rather than trusting self-reported priority values. Including them doesn't hurt, but don't expect them to meaningfully influence crawl behavior.
Whenever pages are added, removed, or meaningfully changed — many sites regenerate their sitemap automatically as part of publishing, so it stays in sync without manual maintenance.
Search Console typically reports specific errors (invalid URLs, malformed XML, URLs blocked by robots.txt) rather than rejecting the entire file — check the Sitemaps report periodically to catch and fix issues.

Generate a sitemap

Build a valid XML sitemap in seconds.

Open Sitemap Generator
Back to blog