What is an XML sitemap?
An XML sitemap is a list of your site's important URLs written for search engines. It helps them find pages faster, especially new ones and ones with few links pointing in.

Key takeaways
- A sitemap lists the canonical, indexable URLs of a site, each optionally with a last-modified date.
- One file holds up to 50,000 URLs; bigger sites use a sitemap index that points to several files.
- Reference it in robots.txt and submit it in Google Search Console, then keep it in sync with your routes.
An XML sitemap is a file, usually at `/sitemap.xml`, that lists the pages on a website you want search engines to discover and index, in a standard machine-readable format. It does not make pages rank; it makes sure crawlers know they exist, which matters most for new sites, large sites, and pages that few other pages link to.
Think of a new neighborhood that is not on any map yet. Delivery drivers will find the main road eventually by driving around. Handing them a list of every street address gets them there on day one.
What a sitemap looks like
The format comes from the sitemaps.org protocol, which the major search engines support. A minimal file for a small app has one entry per page:
`<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><url><loc>https://recipebox.startbase.app/</loc><lastmod>2026-11-20</lastmod></url><url><loc>https://recipebox.startbase.app/recipes/lemon-pasta</loc><lastmod>2026-11-18</lastmod></url></urlset>`
- loc (required): the full, absolute address of the page, using the same domain and protocol as the canonical version.
- lastmod (optional but useful): when the page content last really changed. Google uses it when it is consistently accurate, so do not set every page to today.
- changefreq and priority (optional): part of the protocol, but Google has said it ignores them. You can leave them out.
Limits: one sitemap file can hold up to 50,000 URLs and 50 MB uncompressed. Past that, split it into several files and list them in a sitemap index file.
What to include and leave out
- Include every public page you would be happy to see in search results: home, feature pages, articles, public listings or profiles.
- Leave out sign-in, dashboard, settings, checkout and anything marked `noindex`.
- Leave out duplicates: list only the canonical address of each page (what a canonical URL is).
- For apps with user-generated pages (recipes, listings, profiles), generate the sitemap from the database so new public pages appear automatically.
Adding a sitemap to a Startbase site
The SEO and GEO docs recommend asking Startbase to generate a sitemap.xml that lists every public route, plus a robots.txt that allows crawlers and points to the sitemap. If you use a custom domain (connecting a custom domain), make sure the sitemap uses that domain, not the default `startbase.app` address.
Add a sitemap.xml listing every public route with its real last-modified date, using my custom domain in every URL. Include each published recipe page by reading the recipes table (only rows marked public). Leave out sign-in, dashboard and settings. Add a robots.txt that allows all crawlers, keeps /dashboard out, and has a Sitemap: line pointing to the full sitemap URL.
After publishing, open the sitemap in a browser to confirm it loads, then submit its address in Google Search Console (and Bing Webmaster Tools if you like) and watch the indexing report over the following weeks. The SEO guide for your app covers what to do next.
Common confusions
- XML sitemap vs HTML sitemap. The XML file is for crawlers. An HTML sitemap is a normal page of links for people; it is optional.
- "Listed means indexed." A sitemap is a hint. Search engines still decide whether each page is worth indexing.
- A stale sitemap. Listing pages that now return 404 or redirect wastes crawl attention. Regenerate it when routes change.
- Sitemap vs robots.txt. robots.txt says where crawlers may not go; the sitemap says where you would like them to go. A URL listed in the sitemap but blocked in robots.txt sends mixed signals.
Frequently asked questions
Does a small site need a sitemap?
A five-page site with good internal links will usually be found anyway, but a sitemap is cheap and helps a new domain get discovered faster.
How often should I update my sitemap?
Whenever pages are added, removed or meaningfully changed. Generating it automatically from your routes and data keeps it current without remembering to.

