"Disallow: /", "User-agent: Claude-Web" => "Disallow: /", "User-agent: CCbot" => "Disallow: /", "User-agent: FacebookBot" => "Disallow: /", "User-agent: Google-Extended" => "Disallow: /", "User-agent: GPTBot" => "Disallow: /", "User-agent: PiplBot" => "Disallow: /", "User-agent: ChatGPT-User" => "Disallow: /", "User-agent: PerplexityBot" => "Disallow: /", "User-agent: Bytespider" => "Disallow: /", "User-agent: Omgilibot" => "Disallow: /", "User-agent: Omgili" => "Disallow: /", "User-agent: ImagesiftBot" => "Disallow: /", "User-agent: BardBot" => "Disallow: /", "User-agent: KomoBot" => "Disallow: /", "User-agent: Meta-ExternalAgent" => "Disallow: /", "User-agent: Meta-ExternalFetcher" => "Disallow: /", "User-agent: Diffbot" => "Disallow: /", "User-agent: cohere-ai" => "Disallow: /", "User-agent: Timpibot" => "Disallow: /", "User-agent: Webzio-Extended" => "Disallow: /", "User-agent: YouBot" => "Disallow: /", "User-agent: AI2Bot" => "Disallow: /", "User-agent: AmazonBot" => "Disallow: /", "User-agent: Applebot-Extended" => "Disallow: /", "User-agent: ClaudeBot" => "Disallow: /", "User-agent: OAI-SearchBot" => "Disallow: /", "User-agent: PetalBot" => "Disallow: /", "User-agent: webzio" => "Disallow: /" ]; public function __construct() { add_filter('robots_txt', [$this, 'modify_robots_txt'], 999, 2); // Use higher priority } public function modify_robots_txt($output, $public) { // Add start comment for the block $output .= "\n# START AI Scrape Protect block\n# ---------------------------\n"; // Append the disallow rules for AI bots foreach ($this->lines_to_add as $user_agent => $disallow) { $output .= "$user_agent\n$disallow\n"; } // Add end comment for the block $output .= "# ---------------------------\n# END AI Scrape Protect block\n"; return $output; } } class AISP_Add_Meta_Tags { public function __construct() { add_action('wp_head', [$this, 'add_ai_meta_tags']); } public function add_ai_meta_tags() { echo "\n\n"; echo '' . "\n"; echo '' . "\n"; echo "\n"; } } // Initialize both classes new AISP_Manage_Robots_Txt(); new AISP_Add_Meta_Tags();