mirror of
https://gitea.com/gitea/docs.git
synced 2026-07-21 10:17:42 +00:00
Reviewed-on: https://gitea.com/gitea/docs/pulls/265 Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: ifurther <55025025+ifurther@users.noreply.github.com> Co-committed-by: ifurther <55025025+ifurther@users.noreply.github.com>
902 B
902 B
date, slug, sidebar_position, aliases
| date | slug | sidebar_position | aliases | |
|---|---|---|---|---|
| 2023-05-23T09:00:00+08:00 | search-engines-indexation | 60 |
|
搜索引擎索引
默认情况下,您的 Gitea 安裝将被搜索引擎索引。 如果您不希望您的存放庫对搜索引擎可见,請進一步阅读。
使用 robots.txt 阻止搜索引擎索引
為了使 Gitea 為顶级安裝提供自定义的robots.txt(默认為空的 404),請在 [custom文件夹或CustomPath](administration/customizing-gitea.md)中建立一个名為 public/robots.txt 的文件。
有关如何配置 robots.txt 的示例,請参考 https://moz.com/learn/seo/robotstxt。
User-agent: *
Disallow: /
如果您将 Gitea 安裝在子目錄中,则需要在顶级目錄中建立或编辑 robots.txt。
User-agent: *
Disallow: /gitea/