PHPackages                             deuchnord/no-ai-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Security](/categories/security)
4. /
5. deuchnord/no-ai-bundle

ActiveSymfony-bundle[Security](/categories/security)

deuchnord/no-ai-bundle
======================

Ban AI crawlers from visiting your Symfony website or application

v1.2.0(5mo ago)12147[1 issues](https://github.com/Deuchnord/no-ai-bundle/issues)EUPL-1.2PHPPHP &gt;=8.2CI passing

Since Aug 9Pushed 5mo agoCompare

[ Source](https://github.com/Deuchnord/no-ai-bundle)[ Packagist](https://packagist.org/packages/deuchnord/no-ai-bundle)[ RSS](/packages/deuchnord-no-ai-bundle/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (6)Dependencies (8)Versions (7)Used By (0)

No AI Bundle
============

[](#no-ai-bundle)

[![Coverage Status](https://camo.githubusercontent.com/fd00bff6ad40526631a1254aa0f07e8b9d7a415321833b5c3cae08bb23ade26c/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f44657563686e6f72642f6e6f2d61692d62756e646c652f62616467652e737667)](https://coveralls.io/github/Deuchnord/no-ai-bundle)

A simple Symfony bundle that blocks large language model (LLM) crawlers. When an LLM tries to load a page of your website, a `403 Forbidden` will be automatically returned before your code has even run, saving resources on your server.

Caveats
-------

[](#caveats)

Before you install this bundle, be sure you are aware of the following:

- Microsoft's CoPilot uses [Diffbot](https://diffbot.com)'s and is therefore detected as Diffbot.
- Some companies use the same User-Agent both for LLM crawling and for other tasks. Using this bundle may have more or less negative impacts:
    - Amazon: if you sell products on your website, Amazon won't be able to recommend them anymore.

Requirements
------------

[](#requirements)

To use this bundle, you will need to run:

- PHP 8.2+
- Symfony 6.4+

Installation
------------

[](#installation)

In your Symfony project, install the `deuchnord/no-ai-bundle` package:

```
composer require deuchnord/no-ai-bundle
```

Once installed, the bundle will already be configured to block any request from an LLM crawler. You can test it with a Curl command (here with ChatGPT crawler):

```
 curl -v \
      --url http://localhost/ \ # change the URL here
      --header 'User-Agent: Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko); compatible; GPTBot/1.1; +https://openai.com/gptbot)'
```

Your project will respond a blank page along with a `403 Forbidden` status code.

Note

Each time a request is blocked for LLM crawler detection, an event is dispatched. Feel free to listen to it if you need it:

```
