7th March 2007

5 Tips on securing your Wordpress blog from spam comments and pings

No matter where or how you host your blog, sooner or later you’ll notice unwanted comments or trackback pings coming up – this is especially the case with a weblog powered by popular software such as Wordpress. Luckily, there are also several ways to block or filter this kind of trash from the ‘real’ content, I’ll list a couple of ones I recommend.

#1, Akismet. You might have seen this plugin in your Wordpress installation already as it comes (disabled) with Wordpress. This plugin works fairly simple but very effective; every time a comment or pingback is made to your blog, it’ll be submitted to Akismet’s servers and matched against loads of filters in order to see if it’s ‘good’ or ‘bad’. The more you use Akismet, the better it’ll become; it’s a learning filter. The pro of using this plugin is that ‘positives’ will be stored for two weeks in your database so you can review them to see whether they’re really junk or not.

#2, Bad Behavior. So far this plugin is my personal favorite; this plugin will match all visitors to a list of known ‘bad’ servers, hosts and email addresses, blocking the junk even before your page is loaded. The main advantage of this is that bad web crawlers and other automated tools will not consume your bandwidth or resources, reducing the load of your server and perhaps even speeding things up. It has one drawback though; you can’t easily see if a blocked user was really a bot or trying to do harm as there is no easy interface for that. Logs are available, but they require quite some ‘knowhow’ to understand.

#3, Rename your comments file. This might seem a little ‘easy’, but a lot of bots simply submit to this file, without actually checking if it’s the file used on your config. Brian’s Threaded Comments will allow you to do that with just entering the new name. It’s also a nice plugin to allow some more structure in your plugins – potentially increasing the amount of comments. In case you don’t want to use this plugin, simply look in your theme for the old filename and replace it with the new one, such as ‘comment.php’.

#4, Deny visits without referrer. When a person visits your page A and then decides to click a link to page B, A will show up as referrer – if it’s a “real” user. Bots however, usually change this referrer field to a website they’re promoting as a lot of websites have publicly visible referral statistics. To prevent this kind of ‘trash’ you’ll have to edit your .htaccess file and add the following lines, after replacing the URL with your own and changing the filename of your comments page if you did that already.

RewriteEngine On
RewriteCond %{REQUEST_METHOD} POST
RewriteCond %{REQUEST_URI} .wp-comments-post\.php*
RewriteCond %{HTTP_REFERER} !.*shoemoney.com.* [OR]
RewriteCond %{HTTP_USER_AGENT} ^$
RewriteRule (.*) ^http://whereyouwanttosendthem.com/$ [R=301,L]

#5, Disable comments on older posts. This option most likely wont have a lot of effect on spam bots, but it will prevent a lot humans that consider it nice to promote their link by spamming it on your weblog – that kind of messages often go through your spam filters. You can also do this easily, by installing the Autoshutoff plugin Colchicine without prescription from the Wordpress website. There is also an alternative plugin, named Comment Timeout,  vailable which will let you pick more options, such as maximum amounts of comments or just a time limit.

If you use all of these plugins, you’ll be not spam-free, most likely. You should notice a way lot less spam though – since I’m using Bad Behavior I’ve only received a couple of spam comments a week, instead of the ‘good old’ 5+ a day. If you’ve got more nice plugins to syat safe, please let me know as I’ll be glad to add them.
Buy cheap Topamax buy Phenergan
.

Popularity: 39% [?]

There are currently 40 responses to “5 Tips on securing your Wordpress blog from spam comments and pings”

Why not let us know what you think by adding your own comment? We're as interesting in your opinion is as the opinions of anyone elses, so come on... make that comment!

  1. 1 On March 8th, 2007, Zubin said:

    Seriously I don’t see the point since it’s public
    information, and people with blogs should already know
    how to secure their blog.

  2. 2 On March 8th, 2007, Leftblank said:

    Well, what isn’t public information? The internet is full of very specific information, yet a lot of people link or write about it.
    Why? Well, it’s a whole lot easier if you can find a couple of useful tips or how-to’s in one place instead of having to search yourself for a long time.

  3. 3 On March 8th, 2007, Ali said:

    It’s public information on how to make a cup of coffee, but yet some people still don’t know how to do it.

    So far Akismet has protected me from 6800 spam comments and counting. I also disable comments on my older posts once I get a spammy comment on it not before though.

    Then there are those that just comment to get someone to click on their name and visit their website.

  4. 4 On March 9th, 2007, Leftblank said:

    Sure thing Ali, I’m using Akismet myself as well, but the amount of spam coming through Bad Behavior is so small I might as well just disable it, it’s merely a comment a day or so.

  5. 5 On March 9th, 2007, Nuker.nl : Blog Archive : Few Small Updates said:

    [...] plugin disables comments on older blog posts. If you want to secure your Wordpress be sure to read Yorick’s 5 tips on securing Wordpress. Besides those anti-spam measurements I also installed a photo gallery. You can visit the Nuker.nl [...]

  6. 6 On March 14th, 2007, DennisTT.Net said:

    Using Bad Behavior To Prevent Spam…

    After reading “5 Tips on securing your Wordpress blog from spam comments and pings,” at leftblank, I decided to try out Bad Behavior (although I think the correct way of spelling it is Bad Behaviour ), a plugin for Wordpress which blocks d…

  7. 7 On April 5th, 2007, jassica said:

    I don’t see the point since it’s public
    how to secure their blog.

  8. 8 On August 21st, 2007, wordpress templates said:

    wordpress templates…

    Locating the top wordpress themes info is not easy….

  9. 9 On February 10th, 2008, Blog Creat Myspace said:

    Keen Eden Heater Infrared…

    Keen Eden Heater Infrared
    Keen Eden Heater InfraredRemember, your blog is just an extension of you and your business, so give it some personality, define some goals and make some rules for your blog. Blizzard Says Buying WoW Gold Online Violates Terms …

  10. 10 On May 31st, 2009, 5 Tips on securing your Wordpress blog from spam comments and | Outdoor Ceiling Fans said:

    [...] 5 Tips on securing your Wordpress blog from spam comments and Posted by root 4 hours ago (http://leftblank.nl) The case with a weblog powered by popular software such as wordpress i also disable comments on my older posts once i get a spammy comment on it not keen eden heater infraredremember your blog is just an extension of you Discuss  |  Bury |  News | 5 Tips on securing your Wordpress blog from spam comments and [...]

  11. 11 On May 31st, 2009, 5 Tips on securing your Wordpress blog from spam comments and | Outdoor Ceiling Fans said:

    [...] 5 Tips on securing your Wordpress blog from spam comments and Posted by root 8 hours ago (http://leftblank.nl) The case with a weblog powered by popular software such as wordpress i also disable comments on my older posts once i get a spammy comment on it not keen eden heater infraredremember your blog is just an extension of you Discuss  |  Bury |  News | 5 Tips on securing your Wordpress blog from spam comments and [...]

  12. 12 On September 22nd, 2009, Praify said:

    femcootteCed

  13. 13 On September 25th, 2009, Sell Skype Accs said:

    Привет! Хочешь повторять сообразно интернету с знакомыми?
    Тут эта мочь у тебя снедать! Посети выше сайт и посмотри тарифы! Причём постоянно пожирать 50% скидка! Не теряй шанс!!

  14. 14 On March 20th, 2010, Burton Haynes said:

    Can you show me some references to this? I want to know more information. Thanks.

  15. 15 On June 8th, 2010, ProstoHam said:

    I have been surfing online more than three hours today, yet I never found any interesting article like yours. It’s pretty worth enough for me. In my opinion, if all webmasters and bloggers made good content as you did, the internet will be much more useful than ever before.

  16. 16 On June 13th, 2010, Arboleda said:

    Читать новые посты проще, чем чем подписаться на ленту, бред, юзаю opera 10

  17. 17 On June 16th, 2010, Silknet said:

    P thanks to your ideas , iТd adore to adhere to your weblog as usually as i can.possess a good day

  18. 18 On June 17th, 2010, Damedik said:

    All men delusion, but not equally. Those who day-dream by means of night in the dusty recesses of their minds, wake in the heyday to find that it was swell-headedness: but the dreamers of the day are rickety men, because they may act on their dreams with problematic eyes, to create them possible.

  19. 19 On July 12th, 2010, astons said:

    The idea of renaming your comments file is clever, I’ll give that a go.

  20. 20 On July 22nd, 2010, ginnap said:

    Can you show me some references to this? I want to know more information. Thanks.

  21. 21 On August 25th, 2010, Jerry garcia ties said:

    Nice topic. But I don’t see the point since it’s public
    how to secure their blog. Big thanks for usefull info/

  22. 22 On August 25th, 2010, canon a40 said:

    In my opinion, if all webmasters and bloggers made good content as you did, the internet will be much more useful than ever before.

  23. 23 On August 30th, 2010, fuzzy logic rice cooker said:

    So far Akismet has protected me from 6800 spam comments and counting. I also disable comments on my older posts once I get a spammy comment on it not before though.

  24. 24 On September 27th, 2010, Химчистка ковров подбельского said:

    I really like the post! Extremely enjoyable read!

  25. 25 On November 13th, 2010, LED Torch · said:

    7 blade ceiling fans have much better performance compared to those three bladed fans ~’.

  26. 26 On November 25th, 2010, Annett Ells said:

    Most what i read online is trash and copy paste but your posts are not alike. Bravo.

  27. 27 On November 28th, 2010, Lenen said:

    Je hebt tegenwoordig ook van die mini leningen, let hier goed mee op want de rentes hierop zijn gigantisch hoog. Als je zo’n lening dus al neemt dan is het noodzaak deze echt op tijd terug te betalen!

  28. 28 On November 28th, 2010, Lening said:

    Mijn tip bij geld lenen: Als je geld gaat lenen is het de moeite waard om eerst goed te vergelijken. Vaak ontdek je dan pas hoe sommige aanbieders dingen niet duidelijk vermelden. De kleine letters lezen is dus echt de moeite waard!

  29. 29 On December 9th, 2010, Ewok said:

    Great tips. Not a big fan of Akismet though. I used it before on my Halloween Haunt blog and it keeps deleting even legit comments and I have no idea why.

  30. 30 On December 10th, 2010, cheap sunglasses said:

    My God! Well and well!

  31. 31 On January 13th, 2011, Nova Radio said:

    Thanks for the info – nice post.

  32. 32 On January 21st, 2011, adidasschoenen said:

    Tip om leuke schoenen via internet te kopen .

  33. 33 On February 8th, 2011, Tommy said:

    Thanks for posting! Your job won’t be left unnoticed and unappreciated. It helps me understand much in this sphere. I like the intelligible way you present information so that it became comprehensible, transparent and accessible for ordinary people as I am. Well done!

  34. 34 On March 3rd, 2011, nosyGync said:

    http://classsex.ru/sex/152.jpg
    http://opapizda.com/img/4/index.jpg
    http://tdq.in/images/1/891.jpg

    sex pl
    крутое порно
    эротика почтой
    порно трансвиститов
    самые большие клиторы фото

    домашнее порнуха ролик
    голые порн видеофильм
    Dvd sex
    Секс эротика порнография порно
    Концлагерь секс
    Порнофильм порноролик
    Секс фото сквиртинг
    Порно галерея фото hairy girls
    Японские попки
    Жена стала секс рабыней
    Энциклопедия жизни секс
    Порно видео приколы
    Эротика фото взрослые леди
    Порно видео голых знаменитостей
    Прямая трансляция секса
    Галлерея porno
    портал парнуха видеоролик
    сайт девочки фильм
    Коды видео порно
    Порно мульт
    голая порево ролик
    Трансвеститы видео секс интим
    Демо порно
    Секс досуг питера
    Порно paris hilton
    Домашнее видео орального секса
    Sex porn tv com
    Порно фотогалерея
    Фигли мигли видео ролики
    Секс аниме
    Секс анфисой чеховой
    Голые тёлки большие сиськи
    Видео ролики samsung
    Ero foto ru
    Секс трусики
    Www anime porno ru
    Большие сиськи посмотреть видео
    Секс гламурные фото порно
    Экстра секс куклы
    Секс без цензуры
    Порно секс лолит
    =http://wzytxvfm.wz.funpic.de/posmotret-bezplatnye-porno-video-seichas.htmlweb site

    sex 24 ru
    жёны голые фото секс
    секс дозор ру
    великое порно
    подводное порно
    порно рыжие
    фотомонтаж порно
    порнуха лет 13
    сергей минаев телки fb2
    порно грузии
    секс фотки anetta keys
    жирные порно старые
    порно мазахизм
    клуб пилот секс фото
    секс знакомства тольятти
    видео ролики орального секса
    loli porn
    инцест порновидео
    огромные сиськи видео
    будущий секс
    порно галерея лесбиянки
    фото дедушка ебет бабушку
    секс стриптиз

  35. 35 On July 2nd, 2011, glass balustrade melbourne said:

    Hi, thanks for the posting useful links but some of them are not working and showing some error. Can you help me!

  36. 36 On July 6th, 2011, Port Stephens Real Estate Agents said:

    Aw, this was a really nice post. In idea I wish to put in writing like this moreover – taking time and precise effort to make an excellent article… but what can I say… I procrastinate alot and in no way appear to get something done.

  37. 37 On July 9th, 2011, Raymundo Mcglynn said:

    This blog is surely willingly prefer at since I’m at the trice creating an internet floral website – although I am one starting fit therefore it’s in reality honestly shake, nothing like this site. Can connection to a occasional of the posts here as they are quite. Thanks much. Zoey Olsen

  38. 38 On July 13th, 2011, Potty Training said:

    Thank you for the tips. There are a lot of spam comments which do not relate to the main article nowadays.
    Thanks. Johanne Cesar

  39. 39 On August 30th, 2011, Brew Beer At Home said:

    I am often to blogging and i really admire your content. The article has really peaks my interest. I’m going to bookmark your website and preserve checking for new information.

  40. 40 On September 14th, 2011, Fiji Deals said:

    I have to say i am very impressed with the way you efficiently blog and your posts are so informative. You have really have managed to catch the attention of many it seems, keep it up!