Gitea 禁止搜索引擎索引搜录robots.txt配置
为了使 Gitea 为顶级安装提供自定义的robots.txt(默认为空的 404),请在 [custom文件夹或CustomPath](administration/customizing-gitea.md)中创建一个名为 public/robots.txt 的文件。
默认也就是 ./gitea/public/robots.txt
有关如何配置 robots.txt 的示例,请参考 https://moz.com/learn/seo/robotstxt。
User-agent: *
Disallow: /
如果您将Gitea安装在子目录中,则需要在顶级目录中创建或编辑 robots.txt。
User-agent: *
Disallow: /gitea/
版权所有 © 【代码谷】 欢迎非商用转载,转载请按下面格式注明出处,商业转载请联系授权,违者必究。(提示:点击下方内容复制出处)
源文:《Gitea 禁止搜索引擎索引搜录robots.txt配置》,链接:https://www.daimagu.com/article/2408010904544803.html,来源:【代码谷】
评论