# A repository should be findable by name; its contents should not be # crawled file by file. # # The cost is not abstract. Every page here becomes one or more calls to # the Forgejo instance behind it, on the owner's own hardware, and the # space a crawler would walk is (branches x files x commits) — which for # a single repository with eighteen branches is already tens of # thousands of pages that no one asked for. Google enumerating it is not # an attack, it is Googlebot doing its job. # # So: the listing, the repository's own landing page and the documents # written to be read are open, and everything that expands # combinatorially is closed. # # AI crawlers — retrieval and training alike — are allowed, and are # allowed by being covered by the "*" group below rather than by named # groups of their own. That is deliberate: a named group REPLACES the # "*" group for that crawler rather than adding to it, so # "User-agent: GPTBot / Allow: /" would hand exactly one crawler the # file-by-file walk everything else here exists to prevent. User-agent: * Allow: /$ # Markdown is the part of a repository written to be read, and the cost # argument above does not apply to it: it is a bounded set, it does not # multiply by branch (nothing links to a non-default branch's copy, and # the sitemap names only the default branch's), and it is the only # content here that answers a question a person actually asked. # # These sit above the blob rule on purpose. Google and Bing resolve a # conflict by the most specific match, which these are; crawlers that # instead take the first match get the same answer this way. Allow: /*/*/blob/*.md$ Allow: /*/*/blob/*.markdown$ Disallow: /*/*/blob/ Disallow: /*/*/commits/ Disallow: /*/*/commit/ Disallow: /*/*/raw/ Disallow: /*/*/archive/ Disallow: /*/*/info/refs Disallow: /*/*/git-upload-pack Disallow: /*/*/git-receive-pack Disallow: /api/ Disallow: /login Disallow: /logout Disallow: /auth/ # Directory listings below the repository root: the root tree carries the # README, which is what a search result should show. Deeper ones are the # file-by-file walk this file exists to prevent — and the documents that # live down there are reachable from the sitemap instead, which is why # closing this costs nothing. Disallow: /*/*/tree/*/* Sitemap: https://git.siao.ai/sitemap.xml