This is a very simple plugin to block known AI crawlers from accessing content on your site. It will return a 402 Payment Required status code to any that it finds.
The agent list comes from the ai.robots.txt repository.
Download and copy this repository to /site/plugins/kirby-block-ai
.
git submodule add https://github.com/keslerm/kirby-block-ai.git site/plugins/kirby-block-ai
composer require keslerm/kirby-block-ai
Works out of the box but you can customize it to configure specific response codes and text:
return [
'keslerm.block-ai.response_code' => 403,
'keslerm.block-ai.response_text' => "Go away"
]
- response_code - Change the HTTP response code
- response_text - Change the response text
- agents - A list of user agents to block.
MIT