Newwebs Techs logo Newwebs TechsBuilding websites, explained for beginners
Maintenance and Security

How to Stop Spam Comments Without Killing Real Ones

The first spam comment on a site I built for a friend's bike repair shop arrived nine days after launch, before the site had a single visitor from search. Four lines of broken English and a link to a payday loan page.

A comment moderation screen showing a long pending spam queue beside a discussion settings panel with auto close enabled

The first spam comment on a site I built for a friend's bike repair shop arrived nine days after launch, before the site had a single visitor from search. Four lines of broken English and a link to a payday loan page. By the end of that month the moderation queue held 340 of them, and my friend had stopped opening the notification emails entirely, which meant the two real questions from customers sat unread for a fortnight.

That is the normal pattern, and it catches people out because it has nothing to do with popularity. Bots find a comment form by crawling for the form markup itself. A blog with eleven posts and no traffic gets the same treatment as one with eleven thousand. The useful question is not how to become invisible. It is how to spend twenty minutes once and then stop thinking about it.

Why the queue fills before you have readers

Comment spam is not aimed at your readers. It is aimed at search engines, and for a long time it worked well enough to be worth automating at enormous scale. A bot posts a link, the link sits on your page, and whoever paid for it hopes some of your site's credibility passes along to theirs.

Two things keep this going even though it rarely works any more. The first is that the cost of a spam attempt is close to zero, so a one in ten thousand success rate still pays. The second is that most comment systems publish links with no rel attribute at all unless you configure one, and a bot has no way to tell in advance which sites those are.

The practical consequence for you is twofold. Published spam links can drag down how search engines judge your pages, because you are vouching for a loan site and a pharmacy. And the volume buries anything a human wrote. I have watched both happen on sites with under 500 monthly visitors.

The settings that remove most of it

Do these in order. The first three took me about fifteen minutes on that bike shop site and dropped the daily spam count from roughly forty to under two.

  1. Turn off comments on pages that never needed them. Contact pages, the about page, service pages, anything that is not a blog post. In WordPress this is a per page checkbox under Discussion in the page editor, and there is a bulk edit option for doing fifty at once. On a small business site this alone removes half the attack surface, because bots do not care which page they land on.
  2. Close comments automatically on posts older than 30 or 60 days. Settings, Discussion, then the box for closing comments on articles older than a set number of days. Real discussion on a small site happens in the first week after publishing. Spam arrives forever. I use 45 days and have had one person complain in three years.
  3. Require approval for every comment, and turn off the setting that auto approves anyone with a previously approved comment. That second part matters more than it sounds. Bots post one innocuous comment, get approved, then post links freely under the same email address.
  4. Install one spam filtering service and leave it alone. Akismet is the default and the free tier covers a personal site. It is not perfect, it catches somewhere around 95 percent in my experience, but it moves the survivors into a folder you check weekly instead of an inbox you ignore daily.
  5. Check that comment author links carry a nofollow or ugc attribute. Most platforms do this now. Open a post with an approved comment, view the page source, and look at the link on the commenter's name. If you see a bare href with no rel attribute, that is worth fixing in your theme or with a plugin setting.

Nothing in that list requires a paid tool.

Why a captcha is the wrong first move

The standard advice is to bolt a captcha onto the form and call it solved. I did this for years and now think it is close to the worst available option for a small site.

The reason is that captchas are solved, cheaply, by services that pay people fractions of a cent per puzzle. A determined spam operation gets through. What a captcha reliably stops is a person on a slow phone connection, or someone using a screen reader, or anybody who fails the image grid twice and gives up. You have taxed your three real commenters to inconvenience a bot that was going to be caught by the filter anyway.

There is a narrower version worth keeping. A single checkbox challenge of the Turnstile or hCaptcha variety, which usually resolves without any interaction, costs an honest reader nothing and does filter out the laziest scripts. If you want something in that slot, use that. Just add it fifth, after the four steps above, and measure whether your spam count actually changed. On two of the three sites where I tried it, the change was inside the normal daily variation.

The same scepticism applies to hiding the comment form behind JavaScript, or renaming the comment endpoint. Both work for a few weeks, then stop, and you have a form that fails silently for a fraction of your visitors with no way to notice.

Clearing a backlog without breaking anything

If you already have hundreds of pending comments, do not scroll through them one at a time. Sort the pending queue by date, oldest first, and read only the first twenty. That tells you what your spam actually looks like, which is usually two or three repeating templates.

Then use the search box inside the comments screen for the patterns you found. Search for a recurring phrase, select all results, mark as spam rather than delete. Marking as spam trains the filter. Deleting teaches it nothing. Repeat for three or four phrases and the queue usually collapses to a manageable twenty or thirty genuinely ambiguous items.

One thing to be careful about. If any spam comments were approved and have been sitting on your pages for months, removing them is still correct, but the pages they sat on may have picked up a reputation problem that takes a while to fade. Check whether those pages are still in the index and still ranking for what they used to. If a page with sixty published spam links has quietly dropped out, that is worth knowing about, and it is the same diagnosis process as a page that got crawled but not indexed.

What to check each month

Put ten minutes in your calendar on the first of the month. Open the spam folder and skim subject lines for anything that looks like a real person caught by mistake, which happens maybe once every two months. Empty the folder. Confirm your auto close window is still set. Then close the tab.

Two signals mean something changed and deserve a closer look. A sudden jump from forty spam attempts a day to four hundred usually means your form was added to a new target list, and raising the auto close window tighter is the cheapest response. Spam appearing on pages where you disabled comments means something is posting directly to the comment endpoint, bypassing your form, and at that point you are looking at a server level block rather than a plugin setting. That second case is rare, and it sits next to the checks you would run if you suspected your site had been compromised.

The rest of your monthly routine belongs in the same slot. Everything else in site maintenance benefits from the same treatment: decide once, write the decision down, and check it briefly rather than reacting to notifications.

FAQ

Should I just turn comments off completely?

On a brochure site for a business, yes. There is no upside. On a blog where you answer questions, keep them, because the questions tell you what to write next. I have had three article ideas in the past year that came straight out of a comment.

Do spam comments hurt my search rankings?

Published ones can, because outbound links on your page are treated as endorsements. Pending or filtered ones sit in your database and do nothing at all. The damage comes from approving them, not from receiving them.

Can a robots file stop comment spam?

No. Spam bots ignore it, and blocking crawlers from your comment pages does not stop anything from posting. A robots file is for well behaved crawlers and has no bearing here.

Those are probes. A script posts bland praise to find out whether comments get published automatically. If it appears live, the same address returns with links a few days later. This is exactly why the auto approve setting for returning commenters should stay off.

RM
Ravi Menon

Ravi explains how the web works and how sites get found, aimed at people building their first website.

More posts by Ravi

More in Maintenance and Security

01doorganico 084goad 3hot8 4465456 after5internprogram ahandfulofblessings ahmadpc ahomcybersecurity allodialresources annodex antiquesandperiodcollectibles aotc asianworldkashmir beedlectrics bloggertemplatefree bluefeatheragency bodyweightsolution campaign08blog carfixadvisor catstreetcollective cbstvsports cnfanspurchasing committeeof500yearsofdignityandresistance covertopsdjs cs-kaiyuangame cuestacomunicaciontotal cxoutlet dancebetgame deskgearhub destinyvillastay detectmagazine di33 diamondsteelbuildings donmo dyanadropship emarsysfinance emimattl escapechan eskitarih evautoplay everythingweddings-orlando farmzone feedviewerapp foxstudiosscratch gamevui123 gleasongrade greetingsday hacklabasu haskell iw-kaiyun jagoanproperti jilidskripsi joltbusinessfinance juegodepokergratis juegospucca kaeru-festival latestmehndidesigns lestanzediottaviano litemagazines localcommunityhero lustrsazan mariashebets menswheels nikkit ootheday oxigenvpn plurfitness prefetial probudgetcarpetcleaning psychicmrsmartin pyaten qvantor rejoignezlogis rexzbot riselayouts ruchin rwxqsgd5 sakaltime shibiaowang shop-bot skrtips spotlesshaven strcoding tetapatrium topselller uneplanteartificielle vipertechcr webtech1223411 wo-kygaming yamaha-mekar yeknava yoybuysheets zenunwa yamaha-mekar jilidskripsi ankertoto ankertoto ankertoto