Blocking Referral Spam by IP

Okay, let's say you just come across a known website that is giving you grief and you want to block it by IP address. You can do that also.

Here's a cool website that will allow you to type in the IP address and it will automagically generate the .htaccess code for you:

http://www.htaccesstools.com/block-ips/

So, you begin with this:

Then, just type in the IP or list of IPs you wish to block via your WP .HTaccess file like so:

NOTE: don't use this IPs. They are just here for demonstrative purposes!

The, click the Generate .htaccess file button.

You'll be presented with this:

So, you can then copy and insert this into your .HTAccess file to block specific IPs from ever accessing your website.

Okay, so now you have preventative measures in place to Block any FURTHER referral spam. Yes, it may need to be updated from time to time.

BUT, there may be residual "ghost" referrals already within your Google Analytics. Now, let's discuss how to tweak that and clean up your stats.





Join the Discussion
Write something…
Recent messages
Darwyn Premium
Hey Peej, great training as always bro! This one is a wee bit too advanced for me at the moment my friend. I was still able to understand everything though, that's the sign of a great tutor. I have bookmarked it for the future. Thanks for continuing to bring us all along!
Cheers
Darwyn
Reply
PjGermain Premium
Thanks very much Darwyn! You're getting there!
Reply
AidenTaylor Premium
Great article man, appreciate the time it took you to write it!
Reply
PjGermain Premium
Much appreciated Aiden!
Reply
Traveller75 Premium
Have bookmarked it, Thanks
Reply
PjGermain Premium
Thanks again Wayne!
Reply
Judy-B Premium
I bookmarked it to study. Thank you. :)
Reply
PjGermain Premium
Thank you Judy!
Reply
paulgoodwin Premium
Hi PJ nice one as always - my WA anti spam has picked up Four of these so far so it is a great tool
Reply
PjGermain Premium
Thanks Paul!
Reply
Top