11/15/2026 · By The Comppound Gecko

How to Create an XML Sitemap for a SaaS Site

Here is how to create an XML sitemap: list every canonical URL you want in search results in a UTF-8 file, one entry per page, then submit it in Search Console and reference it in robots.txt. That is the whole mechanical job. The part that decides whether the file helps is the list itself, because a sitemap full of redirects, duplicates and app pages tells search engines less than no sitemap at all.

Say you run a 25-person SaaS selling field-service scheduling software. You have a marketing site, a blog, a help centre, a logged-in app and a staging copy. Only some of those belong in front of Google, and the sitemap is where you say which.

What a sitemap does for a SaaS site

A sitemap is a file that lists the pages you want crawled and indexed. Google's documentation describes it as a hint, not a guarantee: submitting one does not promise that every listed URL will be crawled or indexed.

The documentation also names the situations where a sitemap matters most. A large site benefits, and so does a new site with few external links, because Googlebot may not find pages that nothing points to. A small site that is well linked internally may do fine without one. Google treats roughly 500 pages as the point where a site stops being small, counting only the pages you want in search.

For most B2B SaaS sites the practical answer is to have one anyway. It costs little, it gives you a list of what you consider indexable, and the Search Console report built on it shows problems you would otherwise miss.

Decide which URLs belong in it

Start from the question of which pages you want a stranger to land on from a search result. That list usually contains the homepage, product and feature pages, pricing, integration pages, comparison pages, blog posts and help articles that answer public questions.

Leave out anything a searcher should never reach. Staging and preview URLs, logged-in app screens, thank-you pages, internal search results, filtered or sorted variations of the same page, and tag archives with one post in them all fall in this group. Pages marked noindex should also stay out, since listing a page and telling Google not to index it sends two opposite signals. The guide to meta robots, x-robots-tag and noindex on SaaS sites covers how to keep those two instructions consistent.

Use only canonical URLs. If a page is reachable at a version with a trailing slash and one without, or with tracking parameters, list the single version you want ranked. Every address in the file should return a normal success response, not a redirect and not an error.

Pick a way to generate it

You rarely need to write the file by hand. The common routes are:

  • Your CMS or framework generates it automatically, which is the default on most modern site builders and static site tools.
  • A plugin or build step creates it from your routes and content.
  • A crawler tool exports a list of URLs that you then clean and format.
  • A small script reads your content database and writes the file on a schedule.

For a SaaS site with a blog and a marketing site, generating it from the same data that builds your pages is the safest route, because the sitemap then cannot drift away from what is live. A hand-edited file goes stale the first time someone publishes a page and forgets to add it.

Whichever method you choose, open the output and read it. Automatic generators often include pages you did not intend, such as paginated archives or author pages with no content.

Write the file correctly

Google supports several formats, including XML, RSS and Atom feeds, and plain text with one URL per line. XML is the usual choice because it can carry extra information such as the last modified date.

A minimal XML sitemap has a root element, then one entry per page, each with a fully qualified, absolute address. The file must be UTF-8 encoded, and special characters in addresses must be escaped, for example an ampersand written as its entity form. Mistakes here produce an error in Search Console rather than a silent failure, which is useful.

Two limits apply to every format. A single sitemap can hold at most 50,000 URLs and 50MB uncompressed. A site that exceeds either has to split into multiple files.

Host the file at the root of your site. A sitemap affects only its own directory and the directories below it unless you submit it through Search Console, so a file at the root covers everything.

Handle the last modified date honestly

The optional last modified field is the one that most often goes wrong. Google uses it only when it is consistently and verifiably accurate, meaning it matches when the page genuinely changed in a meaningful way.

The trap is generators that stamp every page with the build date on every build. If every URL claims to have changed this morning, Google learns that the field carries no information and stops trusting it. Fix a real update date for each page, change it when the content changes substantially, and leave it alone for small edits like a footer year.

Google ignores the priority and change frequency fields. Plenty of tools still include them, and removing them does no harm.

Split a large site with a sitemap index

A SaaS site with thousands of programmatic pages, such as integration directories or template galleries, can pass the single-file limit. The answer is a sitemap index: one file that lists your other sitemap files.

Splitting also helps for a reason unrelated to size. Put the blog in one file, product pages in another and help articles in a third. Search Console reports on each file separately, so a drop in indexed pages points straight at the section that has the problem.

Submit it and read the reports

There are two ways to tell search engines where the file is. In Search Console, open the Sitemaps report and add the address. Separately, add a line to robots.txt in the form of the word Sitemap followed by the full address; multiple lines are allowed.

After submitting, return to the report. It shows when Google last read the file and any errors, and the page indexing report shows which listed URLs are indexed and which are not, with reasons. A listed page that is not indexed is the interesting case. The causes are usually a noindex tag, a redirect, a duplicate of another page, or content Google judged too thin, and the crawlability problems guide walks through each.

If you are publishing regularly, pair the sitemap with strong internal links. A sitemap helps discovery, but a page that nothing on your own site links to still signals that you do not value it. The posts on getting a SaaS site indexed by Google and getting new blog posts indexed faster cover that side.

Mistakes that waste a sitemap

A few errors show up again and again:

  • Listing redirected, deleted or noindexed pages
  • Including staging or app URLs by accident
  • Stamping every page with the same fresh date
  • Forgetting to update the file when the site structure changes
  • Treating the sitemap as a way to force indexing

The last one matters most. A sitemap cannot make Google index a weak page. It can only make sure Google knows the page exists, so the work of making the page worth indexing is still yours. For most sites that is also where crawl budget stops being a worry and content quality takes over.

One more note for the AI search era: a sitemap helps ordinary search crawlers, and what you allow or block for AI crawlers is a separate decision made in robots.txt, covered in the post on whether SaaS sites should block AI crawlers.

Want your technical foundations checked and the right pages indexed? See how our SEO growth service handles it.

Frequently Asked Questions

Not always. Google says a small, well linked site may not need one, but a new site with few external links benefits because a sitemap helps Googlebot find pages nothing links to. Since a sitemap costs little to produce, most SaaS teams keep one.

One sitemap file can hold up to 50,000 URLs or 50MB uncompressed, whichever limit you reach first. Larger sites split into several files and list them in a sitemap index.

No. Google describes a sitemap as a hint and says it does not guarantee that listed pages are crawled or indexed. It helps discovery, while indexing depends on the quality and accessibility of each page.

You can leave them out. Google ignores both values, so they add size without adding signal. The last modified date is the only optional field worth keeping, and only if it is accurate.

Still have questions? Talk to our team.

The Comppound Gecko

SEO and AI search for B2B SaaS

Comppound plans, produces and publishes search content for B2B SaaS companies. Every article is researched and drafted with AI, then reviewed by a member of the team for accuracy, clarity and usefulness before it is published.

How we workAbout Comppound

Was this article helpful?

Want your blog doing this every week?

This is what shows up once Comppound handles your content pipeline end to end. Book a call and we'll show you how it works for your site.