Skip to content

robots.txt keeps crawlers to the landing pages - #28

Merged
qiansc merged 1 commit into
mainfrom
feat/robots
Nov 29, 2026
Merged

qiansc merged 1 commit into
mainfrom
feat/robots

Conversation

@qiansc

@qiansc qiansc commented Nov 29, 2026

Copy link
Copy Markdown
Contributor

Background

A headless crawler walks code-reader links at old commits; /robots.txt answered 401.

Changes

  • /robots.txt and /sourcegraph/robots.txt are public and disallow code views, search results, repository pages, /v1/, /api/, /auth/ and /mcp.
  • docs/deployment.md: the portal's client address and robots rules.

Testing

go test ./internal/httpserver/ (new TestRobotsTxt), bun run check.

🤖 Generated with Claude Code

Code views, search results, repository pages and the APIs are
per-commit and endless for a crawler. Served at /robots.txt and
/sourcegraph/robots.txt without authentication. Docs: the portal's
client address and robots rules.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@qiansc
qiansc merged commit a9da9cd into main Nov 29, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant