PulseAugur
实时 07:08:04
English(EN) Thanks. If an AI bot doesn't respect "robots.txt", but it doesn't conceal its user agent setting, the following "nginx" code will apparently work as well: if ($

Nginx 配置阻止不遵守 robots.txt 的 AI 机器人

一位 Mastodon 用户分享了一个用于 Nginx Web 服务器的配置片段。该代码旨在阻止那些不遵守“robots.txt”文件但会表明其用户代理字符串的 AI 机器人。该解决方案旨在帮助网站管理员控制哪些机器人可以抓取他们的网站。 AI

影响 为网站管理员提供了一个管理 AI 机器人访问的工具。

排序理由 该集群描述了一个 Web 服务器的技术配置片段,这是一个用于管理网站访问的工具。

在 Mastodon — fosstodon.org 阅读 →

AI 生成摘要 · Google Gemini · 来自 1 个来源。 我们如何撰写摘要 →

报道来源 [1]

  1. Mastodon — fosstodon.org TIER_1 English(EN) · [email protected] ·

    谢谢。如果一个AI机器人不遵守“robots.txt”,但它不隐藏其用户代理设置,那么以下“nginx”代码显然也能奏效:如果($

    Thanks. If an AI bot doesn't respect "robots.txt", but it doesn't conceal its user agent setting, the following "nginx" code will apparently work as well: if ($http_user_agent ~* (GPTBot|ClaudeBot|put-more-here-ai)) { return 403; } That code goes in the nginx "server" block. #ai …