A SaaS robots.txt should separate valuable public paths from low-value noise. This example focuses on sitemap discovery, crawl guidance, and avoiding accidental emphasis on app-only routes.
Example file
The goal is not to hide everything. The goal is to make the public surface easier to crawl without wasting attention on low-value paths.
User-agent: *
Allow: /
Disallow: /app/
Disallow: /api/
Disallow: /preview/
Disallow: /internal/
Sitemap: https://example.com/sitemap.xmlDisallowing a path does not make it canonical elsewhere. It only changes crawl behavior.
Use it well
Boundaries
Related pages
Next step
If the public site is still confusing after this file looks clean, the next fix probably belongs in your page structure or canonical signals rather than more robots rules.