PHPackages                             dougsisk/laravel-block-referral-spam - 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. dougsisk/laravel-block-referral-spam

AbandonedArchivedLibrary[Security](/categories/security)

dougsisk/laravel-block-referral-spam
====================================

Blocks referral spam using middleware for Laravel 5.5+

1.5(3y ago)51.6k1MITPHPPHP &gt;=7.0.0|&gt;=8.0.0

Since Jan 7Pushed 1y ago1 watchersCompare

[ Source](https://github.com/DougSisk/Laravel-BlockReferralSpam)[ Packagist](https://packagist.org/packages/dougsisk/laravel-block-referral-spam)[ Docs](https://github.com/DougSisk/Laravel-BlockReferralSpam)[ RSS](/packages/dougsisk-laravel-block-referral-spam/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (3)Versions (13)Used By (1)

> # ⚠️ This package is no longer maintained
>
> [](#️-this-package-is-no-longer-maintained)

Laravel Block Referral Spam
===========================

[](#laravel-block-referral-spam)

[![Latest Stable Version](https://camo.githubusercontent.com/9a12454cd0fa49e4ed919a1de20d88134f5653f83ba686ae568578eb140c237d/68747470733a2f2f706f7365722e707567782e6f72672f646f75677369736b2f6c61726176656c2d626c6f636b2d726566657272616c2d7370616d2f76657273696f6e)](https://packagist.org/packages/dougsisk/laravel-block-referral-spam)[![Total Downloads](https://camo.githubusercontent.com/8b9f86caf81b75df197dde6f964b925ef2f25c19bc80033c078a7833bc460704/68747470733a2f2f706f7365722e707567782e6f72672f646f75677369736b2f6c61726176656c2d626c6f636b2d726566657272616c2d7370616d2f646f776e6c6f616473)](https://packagist.org/packages/dougsisk/laravel-block-referral-spam)[![License](https://camo.githubusercontent.com/894f5ce391a8a98ce5476a9e974963717d534cabf3652ba48f092d33d7755227/68747470733a2f2f706f7365722e707567782e6f72672f646f75677369736b2f6c61726176656c2d626c6f636b2d726566657272616c2d7370616d2f6c6963656e7365)](https://packagist.org/packages/dougsisk/laravel-block-referral-spam)

Middleware for **Laravel 5.5+** that blocks referrer spam using a list from [Matomo](https://github.com/matomo-org/referrer-spam-list).

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

[](#installation)

Require this package with composer:

```
composer require dougsisk/laravel-block-referral-spam

```

After updating composer, add the `DougSisk\BlockReferralSpam\Middleware\BlockReferralSpam` to your `web` middleware group in `app/Http/Kernel.php` or any others you wish to use:

```
protected $middlewareGroups = [
    'web' => [
        \DougSisk\BlockReferralSpam\Middleware\BlockReferralSpam::class,
    ],
];

```

Configuration
-------------

[](#configuration)

By default, the list of domains to block will be loaded from `vendor/matomo/referrer-spam-list/spammers.txt`. This is under the assumption your vendor folder is installed in the base path of your app. If your vendor folder is not in your base path or you wish to use a custom list file, add the following line to your `config/app.php`:

```
'referral_spam_list_location' => base_path('my-folder/my-list.txt'),

```

Please remember to follow the formatting in [the original list file](https://github.com/matomo-org/referrer-spam-list/blob/master/spammers.txt) should you make your own custom list.

License
-------

[](#license)

This library is available under the [MIT license](LICENSE).

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity75

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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

Every ~234 days

Recently: every ~434 days

Total

12

Last Release

1198d ago

PHP version history (3 changes)1.0PHP &gt;=5.4.0

1.1PHP &gt;=7.0.0

1.3PHP &gt;=7.0.0|&gt;=8.0.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/4f320f75fb12f31c48921ddaf1ccdc936d5487716e76a983a5949aadd90d52c9?d=identicon)[DougSisk](/maintainers/DougSisk)

---

Top Contributors

[![DougSisk](https://avatars.githubusercontent.com/u/70512?v=4)](https://github.com/DougSisk "DougSisk (27 commits)")

---

Tags

laravelmiddlewarephpreferrer-spammiddlewarelaravelspamblockreferralreferer

### Embed Badge

![Health badge](/badges/dougsisk-laravel-block-referral-spam/health.svg)

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

###  Alternatives

[msurguy/honeypot

Honeypot spam prevention

4381.2M12](/packages/msurguy-honeypot)[stevenmaguire/laravel-middleware-csp

Provides support for enforcing Content Security Policy with headers in Laravel responses.

39107.6k](/packages/stevenmaguire-laravel-middleware-csp)[skydiver/laravel-route-blocker

Block routes by IP

8272.4k](/packages/skydiver-laravel-route-blocker)[masterro/laravel-xss-filter

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

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

Keep your forms alive, avoid TokenMismatchException by gently poking your Laravel app

2211.5k](/packages/laragear-poke)

PHPackages © 2026

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