Skip to content

Commit

Permalink
Merge pull request #46 from lucaspetter/patch-2
Browse files Browse the repository at this point in the history
Explain how subdomains work in README
  • Loading branch information
Matthieu Aubry committed Jun 25, 2015
2 parents 43629f5 + e0a0c1f commit 489c1d3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,18 @@ $list = file('spammers.txt', FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);

## Contributing

To add a new referrer spammer to the list, [click here to edit the spammers.txt file](https://github.com/piwik/referrer-spam-blacklist/edit/master/spammers.txt) and create a pull request. Alternatively you can create a [new issue](https://github.com/piwik/referrer-spam-blacklist/issues/new). In you issue or pull request please **explain where the referrer domain appeared and why you think it is a spammer**.
To add a new referrer spammer to the list, [click here to edit the spammers.txt file](https://github.com/piwik/referrer-spam-blacklist/edit/master/spammers.txt) and create a pull request. Alternatively you can create a [new issue](https://github.com/piwik/referrer-spam-blacklist/issues/new). In your issue or pull request please **explain where the referrer domain appeared and why you think it is a spammer**.

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/piwik/referrer-spam-blacklist/issues) if somebody already reported the host before opening a new one.

### Subdomains

Piwik 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

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:
Expand Down
1 change: 0 additions & 1 deletion spammers.txt
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ savetubevideo.com
screentoolkit.com
search-error.com
semalt.com
semalt.semalt.com
semaltmedia.com
seo-smm.kz
seoexperimenty.ru
Expand Down

0 comments on commit 489c1d3

Please sign in to comment.