PHPackages                             coliving/laravel-block-bots - 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. coliving/laravel-block-bots

ActiveLibrary[Security](/categories/security)

coliving/laravel-block-bots
===========================

Block bots and high traffic offenders using Redis. This is forked from Potelo/laravel-block-bots to make it support Laravel 10

v1.0.0(2y ago)080PHPPHP ^7.1 || ^8.0 || ^8.1

Since Jul 17Pushed 2y agoCompare

[ Source](https://github.com/dungnh/laravel-block-bots)[ Packagist](https://packagist.org/packages/coliving/laravel-block-bots)[ RSS](/packages/coliving-laravel-block-bots/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (5)Versions (3)Used By (0)

Laravel Block Bots
==================

[](#laravel-block-bots)

[![Latest Version on Packagist](https://camo.githubusercontent.com/0fc332483b522f4d1604f9c7b67ac8badc9f986a2b3a86f974cf2958a371258e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f706f74656c6f2f6c61726176656c2d626c6f636b2d626f74732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/potelo/laravel-block-bots)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Total Downloads](https://camo.githubusercontent.com/bda10117d946eb028666d60e6af28a668861938e538e31ded6a2f9d519d2efa8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f706f74656c6f2f6c61726176656c2d626c6f636b2d626f74732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/potelo/laravel-block-bots)

Introduction
------------

[](#introduction)

Laravel Block bots is a pacakge that block bad crawlers, people trying to scrape your website or high-usage users, but lets good and important crawlers such as GoogleBot and Bing pass-thu. (This is forked from Potelo/laravel-block-bots to make it support Laravel 10.)

Features
--------

[](#features)

- ULTRA fast, less than 1ms increase in each request.
- Verify Crawlers using reverse DNS
- Highly configurable
- Redirect users to a page when they got blocked
- Allow Logged users to always bypass blocks

Install
-------

[](#install)

Via Composer

```
composer require coliving/laravel-block-bots
```

#### Requirement

[](#requirement)

- This package rely on heavly on Redis. To use it, make sure that Redis is configured and ready. (see [Laravel Redis Configuration](https://laravel.com/docs/5.6/redis#configuration))

#### Before Laravel 5.5

[](#before-laravel-55)

In Laravel 5.4. you'll manually need to register the `\Potelo\LaravelBlockBots\BlockBots::class` service provider in `config/app.php`.

#### Config

[](#config)

To adjust the library, you can publish the config file to your project using:

```
php artisan vendor:publish --provider="Potelo\LaravelBlockBots\BlockBotsServiceProvider"

```

Configure variables in your .env file:

```
BLOCK_BOTS_ENABLED=true // Enables block bots
BLOCK_BOTS_MODE=production // options: `production` (like a charm), `never` (bypass every route), `always` (blocks every routes)
BLOCK_BOTS_USE_DEFAULT_ALLOWED_BOTS=true // if you want to use our preseted whitelist
BLOCK_BOTS_WHITELIST_KEY=block_bot:whitelist // key for whitelist in Redis
BLOCK_BOTS_FAKE_BOTS_KEY=block_bot:fake_bots // key for fake bots in Redis
BLOCK_BOTS_PENDING_BOTS_KEY=block_bot:pending_bots // key for pending bots in Redis
BLOCK_BOTS_LOG_ENABLED=true // Enables log

```

Usage
-----

[](#usage)

It's simple. Go to `Kernel.php` and add to the `$routeMiddleware` block as :

```
protected $routeMiddleware = [
        ...
        'block' => \Potelo\LaravelBlockBots\Middleware\BlockBots::class,
    ];

```

Than you can put in the desired groups. For exemple, lets set to the Wrb group:

```

 protected $middlewareGroups = [
        'web' => [
            ...
            \App\Http\Middleware\VerifyCsrfToken::class,
            'block:100,daily', // 100 requests per day.
        ],

```

Where:

- **100**: is the number of pages an IP can access every day
- **daily**: is the time period. Options: `hourly`,`daily`, `weekly`, `monthly`, `annually`

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CODE\_OF\_CONDUCT](CODE_OF_CONDUCT.md) for details.

Credits
-------

[](#credits)

- [Potelo](https://github.com/potelo)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1028d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/724121?v=4)[coliving](/maintainers/coliving)[@coliving](https://github.com/coliving)

---

Top Contributors

[![gabrielpeixoto](https://avatars.githubusercontent.com/u/3699061?v=4)](https://github.com/gabrielpeixoto "gabrielpeixoto (23 commits)")[![andrewalkermo](https://avatars.githubusercontent.com/u/20683045?v=4)](https://github.com/andrewalkermo "andrewalkermo (17 commits)")[![jprodrigues70](https://avatars.githubusercontent.com/u/9157395?v=4)](https://github.com/jprodrigues70 "jprodrigues70 (14 commits)")[![bratao](https://avatars.githubusercontent.com/u/1090152?v=4)](https://github.com/bratao "bratao (6 commits)")[![dungnh](https://avatars.githubusercontent.com/u/1852709?v=4)](https://github.com/dungnh "dungnh (4 commits)")[![marivaldojr](https://avatars.githubusercontent.com/u/2505142?v=4)](https://github.com/marivaldojr "marivaldojr (4 commits)")[![davidmuggleton](https://avatars.githubusercontent.com/u/15907082?v=4)](https://github.com/davidmuggleton "davidmuggleton (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/coliving-laravel-block-bots/health.svg)

```
[![Health](https://phpackages.com/badges/coliving-laravel-block-bots/health.svg)](https://phpackages.com/packages/coliving-laravel-block-bots)
```

###  Alternatives

[bagisto/bagisto

Bagisto Laravel E-Commerce

26.2k161.6k7](/packages/bagisto-bagisto)[grumpydictator/firefly-iii

Firefly III: a personal finances manager.

22.8k69.3k](/packages/grumpydictator-firefly-iii)[unopim/unopim

UnoPim Laravel PIM

9.4k1.8k](/packages/unopim-unopim)[akaunting/laravel-firewall

Web Application Firewall (WAF) package for Laravel

999465.8k2](/packages/akaunting-laravel-firewall)[blair2004/nexopos

The Free Modern Point Of Sale System build with Laravel, TailwindCSS and Vue.js.

1.2k2.3k](/packages/blair2004-nexopos)[masterro/laravel-xss-filter

Filter user input for XSS but don't touch other html

41254.5k](/packages/masterro-laravel-xss-filter)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
