PHPackages                             matomo/referrer-spam-blacklist - 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. matomo/referrer-spam-blacklist

ActiveLibrary

matomo/referrer-spam-blacklist
==============================

Community-contributed list of referrer spammers

4.0.3(6mo ago)679263.0k—1%305[4 PRs](https://github.com/matomo-org/referrer-spam-list/pulls)2CC0-1.0

Since Apr 20Pushed 3mo ago64 watchersCompare

[ Source](https://github.com/matomo-org/referrer-spam-list)[ Packagist](https://packagist.org/packages/matomo/referrer-spam-blacklist)[ RSS](/packages/matomo-referrer-spam-blacklist/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)DependenciesVersions (63)Used By (2)

This is a community-contributed list of [referrer spammers](http://en.wikipedia.org/wiki/Referer_spam) maintained by [Matomo](https://matomo.org/), the leading open source web analytics platform.

Usage
-----

[](#usage)

The list is stored in this repository in `spammers.txt`. This text file contains one host per line.

You can [download this file manually](https://github.com/matomo-org/referrer-spam-list/blob/master/spammers.txt), download the [whole folder as zip](https://github.com/matomo-org/referrer-spam-list/archive/master.zip) or clone the repository using git:

```
git clone https://github.com/matomo-org/referrer-spam-list.git

```

### PHP

[](#php)

If you are using PHP, you can also install the list through Composer:

```
composer require matomo/referrer-spam-blacklist

```

Parsing the file should be pretty easy using your favorite language. Beware that the file can contain empty lines.

Here is an example using PHP:

```
$list = file('spammers.txt', FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
```

### Nginx

[](#nginx)

Nginx's `server` block can be configured to check the referer and return an error:

```
if ($http_referer ~ '0n-line.tv') {return 403;}
if ($http_referer ~ '100dollars-seo.com') {return 403;}
...
```

When combined, list exceeds the max length for a single regex expression, so hosts must be broken up as shown above.

Here is a bash script to create an nginx conf file:

```
sort spammers.txt | uniq | sed 's/\./\\\\./g' | while read host;
do
    echo "if (\$http_referer ~ '$host') {return 403;}" >> /etc/nginx/referer_spam.conf
done;
```

you would then `include /etc/nginx/referer_spam.conf;` inside your `server` block

Now as a daily cron job so the list stays up to date:

```
0 0 * * * cd /etc/nginx/referrer-spam-blacklist/ && git pull > /dev/null && echo "" > /etc/nginx/referer_spam.conf && sort spammers.txt | uniq | sed 's/\./\\\\\\\\./g' | while read host; do echo "if (\$http_referer ~ '$host') {return 403;}" >> /etc/nginx/referer_spam.conf; done; service nginx reload > /dev/null
```

### In Matomo (formerly Piwik)

[](#in-matomo-formerly-piwik)

This list is included in each [Matomo](https://matomo.org) release so that referrer spam is filtered automatically. Matomo will also automatically update this list to its latest version every week.

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

[](#contributing)

To add a new referrer spammer to the list, [click here to edit the spammers.txt file](https://github.com/matomo-org/referrer-spam-list/edit/master/spammers.txt) and select `Create a new branch for this commit and start a pull request. `. In your pull request please explain where the referrer domain appeared and why you think it is a spammer. **Please open one pull request per new domain**.

If you open a pull request, it is appreciated if you keep one hostname per line, keep the list ordered alphabetically, and use [Linux line endings](http://en.wikipedia.org/wiki/Newline).

Please [search](https://github.com/matomo-org/referrer-spam-list/pulls) if somebody already reported the host before opening a new one.

### Subdomains

[](#subdomains)

Matomo does sub-string matching on domain names from this list, so adding `semalt.com` is enough to block all subdomain referrers too, such as `semalt.semalt.com`.

However, there are cases where you'd only want to add a subdomain but not the root domain. For example, add `referrerspammer.tumblr.com` but not `tumblr.com`, otherwise all `*.tumblr.com` sites would be affected.

### Sorting

[](#sorting)

To keep the list sorted the same way across forks it is recommended to let the computer do the sorting. The list follows the merge sort algorithm as implemented in [sort](https://en.wikipedia.org/wiki/Sort_(Unix)). You can use sort to both sort the list and filter out doubles:

```
sort -uf -o spammers.txt spammers.txt

```

### Community Projects

[](#community-projects)

[Apache .htaccess referrer spam blacklist](https://github.com/kambrium/apache-referrer-spam-blacklist) - A script for Apache users that generates a list of RewriteConds based on `spammers.txt`.

Disclaimer
----------

[](#disclaimer)

This list of Referrer spammers is contributed by the community and is provided as is. Use at your own discretion: it may be incomplete (although we aim to keep it up to date) and it may contain outdated entries (let us know if a hostname was added but is not actually a spammer).

License
-------

[](#license)

Public Domain (no copyright).

###  Health Score

65

—

FairBetter than 99% of packages

Maintenance74

Regular maintenance activity

Popularity58

Moderate usage in the ecosystem

Community41

Growing community involvement

Maturity77

Established project with proven stability

 Bus Factor1

Top contributor holds 52.6% 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 ~174 days

Recently: every ~530 days

Total

23

Last Release

204d ago

Major Versions

1.1.2 → 3.10.02019-05-30

3.11.0 → 4.0.02020-08-10

### Community

Maintainers

![](https://www.gravatar.com/avatar/80e09d9121023df96ecb1fc20edac8c3d9b724b50dbd3815fa264ae1a6adc58b?d=identicon)[matomo](/maintainers/matomo)

![](https://www.gravatar.com/avatar/0cbe4f579f8070b346debbc2254f1d7e155c25f4fb165d4c77cd7916015ea4f4?d=identicon)[sgiehl](/maintainers/sgiehl)

---

Top Contributors

[![spmedia](https://avatars.githubusercontent.com/u/1646728?v=4)](https://github.com/spmedia "spmedia (905 commits)")[![ericguirbal](https://avatars.githubusercontent.com/u/322135?v=4)](https://github.com/ericguirbal "ericguirbal (357 commits)")[![mnapoli](https://avatars.githubusercontent.com/u/720328?v=4)](https://github.com/mnapoli "mnapoli (96 commits)")[![kambrium](https://avatars.githubusercontent.com/u/11823636?v=4)](https://github.com/kambrium "kambrium (57 commits)")[![Zodiac1978](https://avatars.githubusercontent.com/u/870475?v=4)](https://github.com/Zodiac1978 "Zodiac1978 (44 commits)")[![fl02](https://avatars.githubusercontent.com/u/354515?v=4)](https://github.com/fl02 "fl02 (39 commits)")[![nubranch](https://avatars.githubusercontent.com/u/45213715?v=4)](https://github.com/nubranch "nubranch (26 commits)")[![AaronVanGeffen](https://avatars.githubusercontent.com/u/604665?v=4)](https://github.com/AaronVanGeffen "AaronVanGeffen (25 commits)")[![smokris](https://avatars.githubusercontent.com/u/190164?v=4)](https://github.com/smokris "smokris (24 commits)")[![ajyoon](https://avatars.githubusercontent.com/u/15976214?v=4)](https://github.com/ajyoon "ajyoon (18 commits)")[![appeltauer](https://avatars.githubusercontent.com/u/11379347?v=4)](https://github.com/appeltauer "appeltauer (13 commits)")[![Gaffnet](https://avatars.githubusercontent.com/u/13587501?v=4)](https://github.com/Gaffnet "Gaffnet (12 commits)")[![sgiehl](https://avatars.githubusercontent.com/u/1579355?v=4)](https://github.com/sgiehl "sgiehl (10 commits)")[![d19dotca](https://avatars.githubusercontent.com/u/8153796?v=4)](https://github.com/d19dotca "d19dotca (9 commits)")[![henshaw](https://avatars.githubusercontent.com/u/400424?v=4)](https://github.com/henshaw "henshaw (9 commits)")[![lembitk](https://avatars.githubusercontent.com/u/1476817?v=4)](https://github.com/lembitk "lembitk (7 commits)")[![skylarmt](https://avatars.githubusercontent.com/u/6668965?v=4)](https://github.com/skylarmt "skylarmt (7 commits)")[![CalumChilds](https://avatars.githubusercontent.com/u/25369857?v=4)](https://github.com/CalumChilds "CalumChilds (6 commits)")[![mouse-reeve](https://avatars.githubusercontent.com/u/1807695?v=4)](https://github.com/mouse-reeve "mouse-reeve (5 commits)")[![fvdm](https://avatars.githubusercontent.com/u/93784?v=4)](https://github.com/fvdm "fvdm (5 commits)")

### Embed Badge

![Health badge](/badges/matomo-referrer-spam-blacklist/health.svg)

```
[![Health](https://phpackages.com/badges/matomo-referrer-spam-blacklist/health.svg)](https://phpackages.com/packages/matomo-referrer-spam-blacklist)
```

PHPackages © 2026

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