How To Block Russian Referral Traffic

  • 4webmasters filter analytics

4 webmasters referrer spam

Lately, I seem to be getting a lot of referrer spam as I mentioned in my article titled, “How to Stop Guardlink & Other Referrer Spam“. Now, in today’s article, I’ll be going over how to block Russian referral traffic and why it occurs.

How To Block Russian Referral Traffic: Filter Method

The easiest way to filter out referrer traffic & other spammed referrer traffic sources is to simply follow the instructions below:

1. Log Into Your Google Analytics Account

Google Analytics Login Screen


2. Go To Your “Admin” Tab

Google Analytics Admin Tab


3. Click On “Filters” Under The “View” Section

Google Analytics Filters



4. Click On “+New Filter”

Google Analytics Add New Filter


5. Enter The Information Shown In The Image Below And Click “Save”

4webmasters filter analytics
If the image is not available, then enter as the filter name, select “custom” as the filter type, select “campaign source” as the filter field, enter as the filter pattern, and click save.

How To Block Russian Referral Traffic: Htaccess Method

As I mentioned before, I don’t recommend using this method as the traffic from 4webmasters doesn’t actually affect your website. If you want to try it anyway, you can add this code to your .htaccess file to prevent 4webmasters from registering itself on your site as a referrer:

RewriteCond %{HTTP_REFERER} [NC,OR] RewriteRule .* – [F]

How To Block Russian Referral Traffic: Deflecting Method

Again, not a recommended method, but you can create a text file called “” and add the following code to it:

##referer –> redirect target

After that, you’re going to want to add the following code to your .htaccess

RewriteMap deflector txt:/path/to/
RewriteCond %{HTTP_REFERER} !=””
RewriteCond ${deflector:%{HTTP_REFERER}} =-
RewriteRule ^ %{HTTP_REFERER} [R,L]

Why Does 4Webmasters Referrer Spam Occur?

If you visit 4webmasters.or, you’ll notice that it immediately 301 redirects you to a Russian website called “” that advertises pop-under software. Based on the obvious name “4webmasters”, it’s easy to conclude that the spammer wants webmasters to visit the URL so that they can purchase pop-under software.