Cap icon indicating copy to clipboard operation
Cap copied to clipboard

robots.txt blocks /record-screen, and the sitemap lists 12 URLs crawlers can't use

Open patrickballard opened this issue 1 month ago • 1 comments

Description

Two problems with what cap.so tells search engines, checked as a logged-out visitor against the live site and against main at ec22b5465.

1. robots.txt blocks a landing page. robots.txt has Disallow: /record. Google matches rule paths as prefixes and applies the longest matching rule (its robots.txt spec: /fish matches /fishheads), so this rule also blocks /record-screen, the "Record Screen — Free HD Screen Recorder" page, which is in the sitemap and has its own canonical URL. /record itself returns 404; the web recorder is at /dashboard/caps/record, which Disallow: /dashboard already covers.

2. The sitemap lists 12 URLs that aren't pages a crawler can use. apps/web/app/sitemap.ts lists every page.tsx under app/ except the dashboard, the blog and dynamic routes, so it picks up:

URL what a logged-out visitor gets
/login, /onboarding disallowed by robots.txt, which Search Console reports as "Submitted URL blocked by robots.txt" (/onboarding also redirects to /onboarding/welcome)
/admin, /admin/rebuild-manifests, /admin/replace-video, /admin/reprocess-video, /admin/retry-recordings 404
/c, /s, /embed 307 to /
/verify-otp 307 to /login
/docs/s3-config 308 to /docs (a redirect in next.config.mjs)

/cli/authorize, /cli/complete and /mcp/authorize are listed too. They load for a logged-out visitor, so I've left them alone, though they're sign-in steps rather than content.

Reproduction

  1. Open https://cap.so/robots.txt: Disallow: /record.
  2. Open https://cap.so/sitemap.xml: it lists https://cap.so/record-screen, https://cap.so/login, https://cap.so/admin and the rest of the table.
  3. Open any URL in the table logged out.

I've opened a PR that fixes both; it's linked below.

patrickballard avatar Oct 26 '26 12:10 patrickballard

CAP-932

linear[bot] avatar Oct 26 '26 12:10 linear[bot]