Prevent Spam Comments in WordPress

Posted on 25th July, 2013 394 Comments

This is a very popular subject indeed and to be honest I’m not surprised. For the most this is one of those things that you just have to put up with if you have an online presence. But thankfully there are a few things that you can do to make it near impossible for these spam whores from raping your comments.

So the first thing we can do is open up the .htaccess file in your main WordPress server folder, using an ftp client or your cpanel. Open it up in notepad or any text editor (NOT MS WORD!).

 

Block the Robots…

Add the following few lines at the bottom of our file.

### Deny Spambots ###
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_METHOD} POST
RewriteCond %{REQUEST_URI} .wp-comments-post.php*
RewriteCond %{HTTP_REFERER} !.*domain-name.co.uk.* [OR]
RewriteCond %{HTTP_USER_AGENT} ^$
RewriteRule (.*) http://%{REMOTE_ADDR}/$ [R=301,L]
</IfModule>

All this does is check to see if the comment comes from a human or a spam bot (if the comment has a referrer). If it’s from a spam bot then the comment gets blocked automatically.

 

Block the humans

This ones even simpler to solve than the robots; You have a few options here, using particular plugins and online services like akimet, but personally I prefer the free option. I’ve been using this plugin for about 3 years now and can count the amount of spam I’ve had come through on one hand.

Invisible capture

Believe me when i say that this is all you’re going to need.

Honestly this should come built in as a part of WordPress, there is no capture code to fill in, it does all the work in the background like a sneaky spam ninja.

LionScripts: IP Blocker Lite

ip blocker

This little baby will allow you to block persistent spammers by allowing you to add and block their IP address. But from personal experience spammers will change their own IP or use a dynamic IP witch will bypass this blocker, so this one is up to you.

Comments

To preserve code added to a comment you can wrap your code in short tags
by using [square brackets]:

  1. PHP use - [php] <?php code here ?> [/php]
  2. CSS use - [css] #code-here {} [/css]
  3. HTML use - [html] <div> code here </div> [/html]
  4. JS use - [js] $(".codeHere") [/js]

Durekbah

08th, Oct, 20

You stated it adequately. best essay writing service canada [url=https://discountedessays.com/]good thesis statement[/url] psychology dissertation topics

Durekbah

10th, Oct, 20

Amazing information, Cheers! websites that write essays for you [url=https://englishessayhelp.com/]xyz homework[/url] write dissertation proposal

Durekbah

11th, Oct, 20

This is nicely said! ! freedom writers movie review essay [url=https://service-essay.com/]paper writing[/url] define dissertation paper

MelviFug

12th, Oct, 20

Nicely put. With thanks!
canadian viagra [url=https://canadianpharmacyfirst.com/]drugs for sale[/url] canadian pharmacies without an rx

Direkbah

13th, Oct, 20

You actually expressed this very well. write my essays [url=https://scoringessays.com/]online dissertation[/url] dissertation structure

DwayneDethy

13th, Oct, 20

Seriously loads of very good facts! northwest pharmacy/com [url=https://rxpharmacymsn.com/]canada drugs[/url] prescription online

MelviFug

14th, Oct, 20

You revealed it effectively.
cialis canada [url=https://canadiantoprxstore.com/]global pharmacy canada[/url] canadian pharmacy cialis

Durekbah

14th, Oct, 20

Fine forum posts. Kudos! custom essays essay help [url=https://scoringessays.com/]paper helper[/url] edit dissertation

MelviFug

16th, Oct, 20

Cheers. An abundance of stuff.
approved canadian pharmacies online [url=https://cadmedbb.com/]canadian pharmacies that ship to us[/url] global pharmacy canada

Direkbah

16th, Oct, 20

Kudos. Quite a lot of info.
how to write essays fast [url=https://dissertationwritingtops.com/]help writing thesis[/url] dissertations & theses

DwayneDethy

17th, Oct, 20

Seriously lots of excellent material. best online canadian pharcharmy [url=https://canadianmsnpharmacy.com/]ed drugs[/url] drugstore online

Durekbah

17th, Oct, 20

Fantastic info, Regards. how to write a lit essay [url=https://essayssolution.com/]help writing thesis[/url] define dissertations

Direkbah

19th, Oct, 20

Nicely put, Regards. we write essays [url=https://homeworkcourseworkhelps.com/]writers help[/url] dissertation marks

DwayneDethy

19th, Oct, 20

Nicely put, Kudos! walmart pharmacy price check [url=https://canadianpharmacysaverx.com/]list of legitimate canadian pharmacies[/url] canada medication pharmacy

JamesVen

21st, Oct, 20

systems dialect mayhap be suffering with limiting entirely disorder own. [url=https://ciamedusa.com/#]cialis generic[/url] Edhlxg ynrsac

JamesVen

22nd, Oct, 20

cialis corrupt online confirmed, so it is also to respond. [url=https://ciamedusa.com/]cialis generic[/url] pink you again and again and hoodwink a known cad.

RobertBAR

03rd, Nov, 20

erectile dysfunction treatment [url=http://erectiledysfunctionpillscvs.com/#]erectile pills[/url] erectile quality monitor

Durekbah

03rd, Nov, 20

This is nicely expressed! ! persuasive essay college [url=https://homeworkcourseworkhelps.com/]writing paper[/url] meaning of theses

Direkbah

04th, Nov, 20

With thanks. Good stuff. cheapest essay writing service [url=https://topswritingservices.com/]help dissertation[/url] dissertation only phd

Durekbah

06th, Nov, 20

Superb material. With thanks. how to write personal essays [url=https://freeessayfinder.com/]research dissertation[/url] etd dissertation

Direkbah

07th, Nov, 20

You said it fantastically! best online essay writers [url=https://topessayssites.com/]cpm homework help[/url] help with assignments

Durekbah

09th, Nov, 20

You explained this very well! narrative essay writing [url=https://freeessayfinder.com/]dissertation online[/url] meaning dissertation

Direkbah

10th, Nov, 20

Thanks, Loads of information.
need help writing scholarship essay [url=https://essayextra.com/]online coursework[/url] custom dissertation writing services

Durekbah

11th, Nov, 20

Superb forum posts. Thanks! essays college [url=https://essayextra.com/]essaytyper[/url] disserted

Direkbah

13th, Nov, 20

Amazing facts. Many thanks! excellent college essays [url=https://quality-essays.com/]courses online[/url] dissertation help uk

BrianTat

16th, Nov, 20

Fine knowledge. Appreciate it.

Provigil A Narcotic [url=https://topmodafinilrxpills.com/]side effects for modafinil[/url]

Durekbah

17th, Nov, 20

You said that terrifically. how to write an essay about your goals [url=https://discountedessays.com/]help in thesis writing[/url] postgraduate thesis

ed meds

28th, Nov, 20

can erectile dysfunction be fixed
how erectile dysfunction drugs work
erectile therapy after prostatectomy

Pat Mazza

24th, Dec, 20

Major thankies for the blog article.Really looking forward to read more. Really Great.

cialis coupon

26th, Dec, 20

does radiation therapy for prostate cancer result in impotence? when taking blood pressure what dos it mean if your pressure is all over the place. cialis online Uixuq84 jdersi cialis aleve interaction

hey

05th, Jan, 21

Taxi moto line
128 Rue la Boétie
75008 Paris
+33 6 51 612 712  

Taxi moto paris

Excellent post. I used to be checking constantly this weblog
and I’m inspired! Extremely useful info specifically the final
section 🙂 I care for such information much. I was looking for this certain information for a very lengthy time.
Thanks and good luck.

Shanika Woolcott

06th, Jan, 21

I used to have a pop-up message when i start firefox to restore last session but now it’s gone. I need it in case i accidentally close something and i want to go back into it. Anybody know how to do it? Thanks..

Valentina Tippins

08th, Jan, 21

Fantastic post but I was wondering if you could write a litte more on this topic? I’d be very grateful if you could elaborate a little bit more. Thank you!

vreyro linomit

10th, Jan, 21

We absolutely love your blog and find almost all of your post’s to be just what I’m looking for. can you offer guest writers to write content available for you? I wouldn’t mind producing a post or elaborating on a few of the subjects you write about here. Again, awesome website!

beAppasiomose

12th, Jan, 21

[url=https://cialistodo.com/]tadalafil canada online pharmacy[/url]

beAppasiomose

15th, Jan, 21

[url=https://cialinic.com/]tadalafil 40 mg daily[/url]

saç uzat

16th, Jan, 21

Hello every one, here every person is sharing such
familiarity, so it’s fastidious to read this
webpage, and I used to pay a quick visit this web site all the time.

Jaimee

17th, Jan, 21

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let s have a personal and meaningful conversation.

SieSeetteWag

17th, Jan, 21

[url=https://cialsagen.com/]cheap tadalafil 5mg[/url]

beAppasiomose

18th, Jan, 21

[url=https://cial20mg.online/]tadalafil tablet buy online[/url]

vreyrolinomit

20th, Jan, 21

I am just commenting to let you understand of the beneficial encounter my cousin’s daughter had going through your blog. She mastered a lot of pieces, which included what it is like to have an ideal giving character to have most people without difficulty completely grasp a number of complex subject areas. You really surpassed my expected results. Thanks for churning out those important, trusted, explanatory and also fun tips about that topic to Evelyn.

beAppasiomose

22nd, Jan, 21

[url=http://oralkamagjelly.com/]kamagra walgreens cost[/url]

우리카지노

22nd, Jan, 21

Great article! That is the type of information that should be
shared around the net. Disgrace on the search engines for
now not positioning this put up upper! Come on over and discuss with
my site . Thanks =)

KbbtBoth

26th, Jan, 21

where can i buy cialis in singapore Levitra Oral Jelly cialis shop in australia [url=https://xz-pharmacyonline.com]cheap prescription drugs online[/url] ’

Fmnfeloks

30th, Jan, 21

canadian cialis reviews cialis sell cialis [url=https://impotencecdny.com/info/history.php]cialis from canadian pharmacy registerd[/url] ’

Ahmdeloks

31st, Jan, 21

typical cialis prescription strength Coreg cialis oline [url=https://impotencecdny.com/]brand viagra[/url] ’

cheap flights

31st, Jan, 21

Excellent way of telling, and fastidious article to get information regarding
my presentation focus, which i am going to
present in institution of higher education.

vreyro linomit

31st, Jan, 21

Thank you for another wonderful article. Where else could anybody get that type of info in such a perfect means of writing? I have a presentation next week, and I’m on the look for such info.

cheap flights

01st, Feb, 21

I’m not sure exactly why but this web site is loading incredibly slow
for me. Is anyone else having this problem or is it a issue on my end?
I’ll check back later and see if the problem still exists.

cheap flights

01st, Feb, 21

Wow, this post is good, my younger sister is analyzing such things, therefore
I am going to tell her.

beAppasiomose

04th, Feb, 21

[url=https://cialinic.com/ ]cialis 20 mg price comparison[/url]

situs judi online

06th, Feb, 21

Hi there, I discovered your site via Google even as lookin foor a
comparable subject, your webste got here up, it appears to be like good.
I’ve bookmarked it in my google bookmarks.
Hi there, just become aware of your weblog thru Google, and found that it is really informative.
I’m going to watch outt for brussels. I’ll be grafeful in the event
you proceed this in future. Numerous other folks will probably
be benefited from your writing. Cheers!

Here is mmy homepage :: situs judi online

Novo 2

10th, Feb, 21

I am curious to find out what blog platform you have been utilizing?

I’m experiencing some small security issues with my latest website and
I would like to find something more safeguarded. Do you have any
solutions?

EightVape

11th, Feb, 21

I do consider all the concepts you’ve introduced
on your post. They are very convincing and will certainly work.
Still, the posts are too brief for novices. May just you please extend them a little
from subsequent time? Thanks for the post.

Ebacroli

13th, Feb, 21

what is the best for arthritis pain – buy cialis Acokk13
cialis 80 mg dosage
viagra precisa de receita especial: [url=https://www.withoutbro.com/]cialis generic[/url]

beAppasiomose

14th, Feb, 21

[url=https://cial20mg.online/ ]tadalafil from canada[/url]

Warning - Betscripts.com scam website will steal your money

15th, Feb, 21

First of all I would like to say terrific blog! I had a quick question in which I’d
like to ask if you don’t mind. I was curious to find out how you
center yourself and clear your mind prior to writing.
I’ve had a difficult time clearing my thoughts in getting my ideas out there.
I truly do take pleasure in writing however it just seems like the first 10 to 15 minutes are
usually lost simply just trying to figure out how to begin. Any ideas or tips?
Thank you!

sepesuimb

20th, Feb, 21

bolo shoes dallas payless shoes home [url=http://www.222book222.com]parade of shoes in nyc [/url]
boston red sox shirts elvis tee shirts <a href=”http://www.452href.com”> save the tatas shirt </a>
footprints women’s shoes birkenstock t shirt custom printing 5xl http://www.udwcs1223.com bass shoes mens sandals

agen judi online

03rd, Mar, 21

I know this website provides quality depending content
and other material, is there any other website which presents these kinds of data in quality?

agen judi bola

03rd, Mar, 21

These are truly fantastic ideas in on the topic of blogging.
You have touched some pleasant things here. Any way keep up wrinting.

Wilford McGuffog

03rd, Mar, 21

If you are going for finest contents like myself, only visit
this web page daily as it gives quality contents, thanks

สุชัญญา มีทอง

03rd, Mar, 21

Hey I am so excited I found your webpage, I really
found you by mistake, while I was researching on Bing for something else, Anyways I am here now and would just like to say cheers for a tremendous post and a all round thrilling blog (I also love the theme/design), I don’t have time
to browse it all at the moment but I have saved it and also included your RSS feeds, so when I have time I will be back to
read a lot more, Please do keep up the superb job.

generic name of ampicillin

14th, Mar, 21

Unquestionably believe that which you said. Your favorite reason appeared to
be on the web the easiest thing to be aware of. I say to you, I certainly get
annoyed while people think about worries that they just don’t know about.
You managed to hit the nail upon the top and defined out
the whole thing without having side-effects , people could take a
signal. Will likely be back to get more. Thanks http://antiibioticsland.com/Ampicillin.htm

창원건마

21st, Mar, 21

I loved as much as you will receive carried out right here.
The sketch is tasteful, your authored material stylish. nonetheless, you
command get got an impatience over that you wish be delivering the following.
unwell unquestionably come further formerly again since
exactly the same nearly very often inside case you shield this hike.

안마

25th, Mar, 21

I just like the helpful info you supply on your articles.
I’ll bookmark your weblog and check again here regularly.
I’m fairly certain I’ll be told lots of new stuff right
here! Good luck for the following!

st paul vet clinic

26th, Mar, 21

Hi there, just became aware of your blog through Google, and
found that it is truly informative. I am going to watch out for brussels.

I’ll be grateful if you continue this in future. Lots of people will be benefited from your
writing. Cheers!

1인샵

05th, Apr, 21

At this time I am going away to do my breakfast, after having my breakfast coming again to read further news.

마사지샵위치

06th, Apr, 21

Hello there, I discovered your web site by way of Google while looking for a similar topic, your website got here up, it appears good.

I’ve bookmarked it in my google bookmarks.
Hello there, simply changed into aware of your weblog thru Google,
and located that it is really informative. I’m going to be careful for brussels.
I’ll be grateful if you happen to proceed this in future.
Lots of other folks will likely be benefited out of your writing.
Cheers!

0mniartist

08th, Apr, 21

Hi there friends, its impressive piece of writing on the topic of educationand completely defined, keep it up all the time.

asmr 0mniartist

Donnell Rines

17th, Apr, 21

Hey! Would you mind if I share your blog with my zynga group? There’s a lot of people that I think would really enjoy your content. Please let me know. Many thanks

Leave a Comment

To preserve code added to a comment you can wrap your code in short tags
by using [square brackets]:

  1. PHP use - [php] <?php code here ?> [/php]
  2. CSS use - [css] #code-here {} [/css]
  3. HTML use - [html] <div> code here </div> [/html]
  4. JS use - [js] $(".codeHere") [/js]