Issue 280
Decide: how to keep sign-in and account pages out of search results (noindex vs robots.txt)
Back to our planDone
enhancementfrontendpriority: low
Problem
docs/roles/seo-specialist.md long showed a robots.txt that also blocks /api/ and /login; the site's src/app/robots.ts blocks only /admin/*. Which is right is the owner's call (found in review of #278).
Corrected options (revisited 2026-10-23, at the owner's request)
What Google's own documentation says:
- robots.txt controls crawling, not indexing: it "is not a mechanism for keeping a web page out of Google. To keep a web page out of Google, block indexing with
noindex." (Introduction to robots.txt, opens in a new tab) - For
noindexto work, "the page or resource must not be blocked by a robots.txt file", otherwise "the crawler will never see the noindex rule." (Block Search indexing with noindex, opens in a new tab) - Files under a blocked path are excluded from crawling, so blocking
/api/would hide the site's images, which are served from/api/media/file/....
So blocking /login or /api/ in robots.txt is the wrong tool: it wouldn't reliably keep /login out of results and would cost image search. What exists today (checked on main): /reset-password and /confirm-email already send noindex; /login, /forgot-password and /account don't.
Question for the owner (asked one at a time, after #274)
How should we keep sign-in and account pages out of search results?
- A.
noindexon those pages, robots.txt unchanged (recommended): addnoindexto/login,/forgot-passwordand/account(and #187's new sign-up and verify pages). robots.txt keeps blocking only/admin/*;/api/stays crawlable so images remain in image search. - B. A plus
noindexon the JSON API: also send anX-Robots-Tag: noindexheader on/api/responses except/api/media/file/. Keeps raw API answers out of results, at the cost of one more rule to maintain; they're rarely linked, so the benefit is small. - C. Leave as is: sign-in pages could appear in search results.
Acceptance criteria
- Not done: The answer is quoted here; the pages,
robots.ts(if needed) and the SEO role guide match it - Not done:
/api/media/file/stays crawlable
Area
frontend
Priority
Low
Generated by Claude Code, opens in a new tab