Title: Block Referer Spam
Author: supersoju
Published: <strong>16 جولای 2015</strong>
Last modified: 16 آگوست 2026

---

جستجوی افزونه‌ها

![](https://ps.w.org/block-referer-spam/assets/banner-772x250.jpg?rev=1553052)

![](https://ps.w.org/block-referer-spam/assets/icon-256x256.png?rev=1553044)

# Block Referer Spam

 توسط [supersoju](https://profiles.wordpress.org/supersoju/)

[دانلود](https://downloads.wordpress.org/plugin/block-referer-spam.1.2.zip)

 * [جزئیات](https://fa.wordpress.org/plugins/block-referer-spam/#description)
 * [نقد و بررسی‌ها](https://fa.wordpress.org/plugins/block-referer-spam/#reviews)
 *  [نصب](https://fa.wordpress.org/plugins/block-referer-spam/#installation)
 * [توسعه](https://fa.wordpress.org/plugins/block-referer-spam/#developers)

 [پشتیبانی](https://wordpress.org/support/plugin/block-referer-spam/)

## توضیحات

**Block Referer Spam** stops the bots that fake an `HTTP_REFERER` header to advertise
their own site in your traffic logs and analytics. They’re good enough at simulating
real visits that they show up in **Google Analytics** right alongside genuine traffic—
this plugin blocks the known offenders before they’re ever logged, and needs no 
configuration to start working.

Two blocking modes cover different hosting setups:

 * **Rewrite mode** (Apache only) — adds `RewriteCond` rules to `.htaccess` so spam
   requests are rejected by the web server itself, before WordPress even loads. 
   Fastest option, and the default when your host is detected as Apache.
 * **WordPress mode** — checks the referer during normal WordPress request handling
   and returns a 403. Works on any host, including nginx, but can’t intercept a 
   request that’s served entirely from a full-page cache (see the FAQ below) — the
   plugin will warn you on its settings page if it detects an active caching plugin
   while running in this mode.

The block list itself is a mix of several public spam-referer sources, merged and
refreshed automatically once a day (or on demand from the settings page). You can
also add your own domains to block, including internationalized (non-ASCII) domain
names — they’re normalized automatically.

From [Wikipedia](https://en.wikipedia.org/wiki/Referer_spam):

    ```
    Referrer spam (also known as log spam or referrer
    bombing) is a kind of spamdexing (spamming aimed
    at search engines). The technique involves making
    repeated web site requests using a fake referer URL
    to the site the spammer wishes to advertise. Sites that
    publish their access logs, including referer statistics,
    will then inadvertently link back to the spammer's site.
    These links will be indexed by search engines
    as they crawl the access logs.

    This benefits the spammer because the free link improves
    the spammer site's search engine ranking owing
    to link-counting algorithms that search engines use.
    ```

#### Features

 * Automatic daily updates of the referer spam block list, or trigger an update 
   manually
 * Add your own custom domains to the block list, with automatic IDN/Punycode normalization
 * Two blocking modes to fit Apache or non-Apache hosting: mod_rewrite or WordPress-
   level
 * Warns you if a caching plugin is likely to interfere with WordPress-mode blocking

#### Pro

Pro plans start at $2/mo. Visit [BlockReferSpam.com](https://blockreferspam.com)
for more information.

 * Sync your custom block list across all of your registered sites
 * Access to additional curated block lists

#### Examples Blocked

 * semalt
 * buttons-for-website
 * floating-share-buttons
 * 4webmaster
 * ilovevitaly
 * … و بسیار فراتر از اینها

Found a bug, or want to contribute? Get in touch — support / supersoju.com

Cover photo by [Lukas Budimaier](https://unsplash.com/@lukasbudimaier)

## عکس‌های صفحه

[⌊Admin Interface⌉⌊Admin Interface⌉[

Admin Interface

## نصب

 1. Install Block Referer Spam automatically, or upload the plugin ZIP file.
 2. Activate the plugin through the “Plugins” menu in WordPress.
 3. Go to the “Referer Spam” admin menu to review your blocking mode and options — 
    the defaults work for most sites without any changes.

#### Using WP-CLI

    ```
    wp plugin install block-referer-spam --activate
    ```

## سوالات متداول

### What sites are blocked?

This plugin merges several public referer-spam block lists rather than relying on
just one, refreshed automatically once a day, to keep coverage broad.

### I still see those websites in my Google Analytics history!

Block Referer Spam prevents _new_ spam hits from being logged — it doesn’t retroactively
clean up analytics data you already have. To filter out existing spam entries in
Google Analytics, see [this tutorial](https://megalytic.com/blog/how-to-filter-out-fake-referrals-and-other-google-analytics-spam).

### I tested my site and a known spam referer can still get through!

A few common causes:

 1. **The site isn’t on the block list yet.** The list refreshes once a day, so very
    new spam domains may take a little while to be added. In the meantime, add it as
    a custom block yourself.
 2. **A caching plugin is serving the request from cache.** In WordPress blocking mode,
    a full-page cache (e.g. WP Rocket, W3 Total Cache, WP Super Cache, LiteSpeed Cache)
    can serve a cached page before WordPress — and this plugin — ever runs. Switch 
    to Rewrite mode (Apache only) if you’re using a caching plugin, since it blocks
    at the web-server level before caching applies.
 3. **Your host doesn’t support Rewrite mode.** If `.htaccess` isn’t writable, or you’re
    not on Apache, use WordPress mode instead.

### Does this work with caching plugins?

Rewrite mode does, since it blocks before caching applies. WordPress mode can be
bypassed by full-page caching — the plugin detects common caching plugins and shows
a warning on its settings page if you’re running WordPress mode alongside one, so
you can switch to Rewrite mode if your host supports it.

### I found a bug!

Please report it — we aim to fix reported issues quickly.

## نقد و بررسی‌ها

![](https://secure.gravatar.com/avatar/b2c61585d24109b749c57e1d6b4448c29c70d36a6646b6eb3030aaa8f93eeb28?
s=60&d=retro&r=g)

### 󠀁[Instantly killed my dashboard 302](https://wordpress.org/support/topic/instantly-killed-my-dashboard-302/)󠁿

 [scutterfly](https://profiles.wordpress.org/scutterfly/) 7 ژوئن 2022

The second I installed this plugin I lost access to my dashboard. Main site was 
running but all dashboard pages returned an error caused by too many redirects. 
You need to rename the plugin folder and delete the various lines of “stuff” the
plugin adds to your .htaccess file. A tense and stressful few minutes while I figured
out how to undo the damage this plugin did. It’s not worth the risk of installing
it so stay away from it.

![](https://secure.gravatar.com/avatar/beb65d6504263cb01a973d75240c429091156938f4eede568f324f4c4109cdd2?
s=60&d=retro&r=g)

### 󠀁[It is works !](https://wordpress.org/support/topic/it-is-works/)󠁿

 [lily1969](https://profiles.wordpress.org/lily1969/) 28 فوریه 2019

Thank you

![](https://secure.gravatar.com/avatar/9eac656a335e4a0673c5a0a54f4b9d6cece19c13f48d1738f2bde7f2b888239c?
s=60&d=retro&r=g)

### 󠀁[Great!](https://wordpress.org/support/topic/warning-101/)󠁿

 [craighobson](https://profiles.wordpress.org/craighobson/) 14 ژوئن 2017 1 پاسخ

Awesome, thanks!

![](https://secure.gravatar.com/avatar/697d8f2e8496b6804837c7dc25a314240b7b79132977ca70c13a9912d7e6abfb?
s=60&d=retro&r=g)

### 󠀁[Yes! this REALLY does work](https://wordpress.org/support/topic/yes-this-really-does-work-december-24-2016/)󠁿

 [infinitybassuk](https://profiles.wordpress.org/infinitybassuk/) 24 دسامبر 2016
1 پاسخ

I’ve tried quite a few of these referrer SPAM blocker plugins before – and I was
not expecting much – but I have been converted !! :+) I don’t like messing with 
htaccess (I’m accident prone), so I thought I would give it a try.. I use this plugin
in WordPress Block mode, and over the last week or so, I’ve had ZERO referrer SPAM,
on two analytics plugins I use. I have also been researching and adding my own list
of ghost websites to the one provided by the plugin – including a devious one via
twitter from that guy who claims he is doing nothing illegal (!); There are over
600 sites in my list, and it’s growing day by day. Keep doing what you guys are 
doing – a great job !! :+)

![](https://secure.gravatar.com/avatar/db5237b184f08505f9c7a35f39ceaa84757f15dd59c5afa8a648f68a4ebdbe7c?
s=60&d=retro&r=g)

### 󠀁[WTF? Must role off a backup](https://wordpress.org/support/topic/wtf-must-role-off-a-backup/)󠁿

 [Seolotsen](https://profiles.wordpress.org/webdesigngettorf/) 25 نوامبر 2016 2 
پاسخ

I have installed it – and get a 403 as results for all my pages. Worst Plugin. And
Referrer is written with double “r” – experts

![](https://secure.gravatar.com/avatar/60ebebab09b8f79d6e90dc171c1d2f3d0f648cef583bd8ec3ada62025493ad39?
s=60&d=retro&r=g)

### 󠀁[No good whatsoever](https://wordpress.org/support/topic/no-good-whatsoever/)󠁿

 [Jeff Rudd](https://profiles.wordpress.org/jeff-rudd/) 14 اکتبر 2016

When it comes to getting rid of www1.free-share-buttons.top – its COMPLETELY useless.

 [ خواندن تمامی 21 نقد و بررسی‌ ](https://wordpress.org/support/plugin/block-referer-spam/reviews/)

## توسعه دهندگان و همکاران

“Block Referer Spam” نرم افزار متن باز است. افراد زیر در این افزونه مشارکت کرده‌اند.

مشارکت کنندگان

 *   [ supersoju ](https://profiles.wordpress.org/supersoju/)
 *   [ codestic ](https://profiles.wordpress.org/codestic/)

[ترجمه “Block Referer Spam” به زبان شما.](https://translate.wordpress.org/projects/wp-plugins/block-referer-spam)

### علاقه‌ مند به توسعه هستید؟

[کد را مرور کنید](https://plugins.trac.wordpress.org/browser/block-referer-spam/)،
[مخزن SVN](https://plugins.svn.wordpress.org/block-referer-spam/) را بررسی کنید،
یا از طریق [RSS](https://plugins.trac.wordpress.org/log/block-referer-spam/?limit=100&mode=stop_on_copy&format=rss)
در [گزارش توسعه](https://plugins.trac.wordpress.org/log/block-referer-spam/) مشترک
شوید.

## گزارش تغییرات

#### 1.2

 * Security: added a CSRF nonce check to the manual list-download action
 * Security: enabled TLS certificate verification on the pro license request
 * Security: fixed stored XSS in the Blocked Sites list and the pro key status message
 * Security: replaced a raw PHP stream request with the WordPress HTTP API for list
   downloads
 * Fix: flash messages no longer rely on PHP sessions (which were never actually
   started)
 * Fix: uninstall now removes all plugin options, `.htaccess` rules, and the scheduled
   cron event
 * Fix: scheduled cron event is now cleared on deactivation, instead of left running
 * Fix: daily cron now respects the Auto Update setting instead of ignoring it
 * Fix: PHP notice when no HTTP referer is present on the request
 * Fix: removed unused/dead code left over from the bundled IDN library that failed
   to parse on PHP 8
 * Improvement: `.htaccess` rewrite rules are kept ahead of caching-plugin rules,
   so Rewrite mode still blocks spam when a caching plugin is active
 * Improvement: new admin notice when WordPress Block mode is active alongside a
   known caching plugin
 * Improvement: the merged block list is now cached instead of re-parsed on every
   request
 * Improvement: custom-block domain normalization now uses PHP’s native IDN support
   when available, only falling back to the bundled library on hosts without it
 * Tested up to WordPress 7.0.3

#### 1.1.9.3

 * Tested for WordPress 5.0
 * Fix issue where updated list sometimes does not get written to .htaccess when
   called via cron

#### 1.1.9.1

 * Cleans up after itself on deactivation

#### 1.1.9

 * Pro version available

#### 1.1.8.5

 * Readme typo fixes
 * Blocklist back to using custom solution

#### 1.1.7

 * Readme typo fixes
 * Blocklist back to using custom solution

#### 1.1.6

 * Updated blocklist provider

#### 1.1.5

 * Added functionality to backup previous .htaccess in case something goes wrong.

#### 1.1.4

 * Tested successfully on WordPress latest version (4.4).
 * Fixed a bug where other plugins could prevent Block Referer Spam from working.
 * Added box to honor contributors of this plugin.

#### 1.1.3

 * Added Spanish translations!
 * If you would like to help and translate this plugin, get in touch!

#### 1.1.2

 * Bugfix! Sorry guys! 🙂

#### 1.1

 * Major update!
 * Fixed some critical bugs that could break the site.
 * Fixed some more bugs that could have produced notices.
 * Added validation and support for international domains!
 * Added cloud-feature to learn from all installations worldwide!
 * Fixed some mistakes in the German translation.

#### 1.0.4

 * Fixed the plugin to run on PHP versions lower than 5.4. It should now work on
   older providers and servers that have not been updated for a while.

#### 1.0.3

 * Fixed a bug that in “Rewrite Blocking”, rules were not actually enforced. Sorry
   about that!

#### 1.0.2

 * Improved FAQs
 * Added writable check for .htaccess
 * Added WP-CLI installation instructions
 * Added part of Wikipedia about referer spam

#### 1.0.1

 * Added German localization
 * Updated screenshot and fixed typos
 * Added frequently asked questions

#### 1.0

 * Initial version

## اطلاعات

 *  نگارش **1.2**
 *  آخرین به‌روزرسانی **2 هفته پیش**
 *  نصب‌های فعال **500+**
 *  نگارش وردپرس ** 3.0.2 یا بالاتر **
 *  آزمایش‌شده تا **7.0.4**
 *  زبان
 * [English (US)](https://wordpress.org/plugins/block-referer-spam/)
 * برچسب
 * [analytics spam](https://fa.wordpress.org/plugins/tags/analytics-spam/)[referer spam](https://fa.wordpress.org/plugins/tags/referer-spam/)
   [referral spam](https://fa.wordpress.org/plugins/tags/referral-spam/)[referrer spam](https://fa.wordpress.org/plugins/tags/referrer-spam/)
   [spam](https://fa.wordpress.org/plugins/tags/spam/)
 *  [نمایش پیشرفته](https://fa.wordpress.org/plugins/block-referer-spam/advanced/)

## امتیازها

 3.4 از 5 ستاره.

 *  [  امتیاز 12 5-ستاره     ](https://wordpress.org/support/plugin/block-referer-spam/reviews/?filter=5)
 *  [  امتیاز 0 4-ستاره     ](https://wordpress.org/support/plugin/block-referer-spam/reviews/?filter=4)
 *  [  امتیاز 1 3-ستاره     ](https://wordpress.org/support/plugin/block-referer-spam/reviews/?filter=3)
 *  [  امتیاز 0 2-ستاره     ](https://wordpress.org/support/plugin/block-referer-spam/reviews/?filter=2)
 *  [  امتیاز 8 1-ستاره     ](https://wordpress.org/support/plugin/block-referer-spam/reviews/?filter=1)

[بررسی شما](https://wordpress.org/support/plugin/block-referer-spam/reviews/#new-post)

[مشاهدهٔ همهٔ بررسی‌ها](https://wordpress.org/support/plugin/block-referer-spam/reviews/)

## مشارکت کنندگان

 *   [ supersoju ](https://profiles.wordpress.org/supersoju/)
 *   [ codestic ](https://profiles.wordpress.org/codestic/)

## پشتیبانی

چیزی برای گفتن دارید؟ نیاز به کمک دارید؟

 [مشاهده انجمن پشتیبانی](https://wordpress.org/support/plugin/block-referer-spam/)