You publish a genuinely useful post, go to bed happy, and wake up to 47 new comments — 46 of them selling crypto signals, fake Rolexes, and “miracle” weight-loss pills. That flood is not a sign your blog is popular. It is a sign bots found your comment form.
Here is the good news: you can learn how to block spam comments in WordPress without plugin — WordPress already ships with the tools you need. In about 30 minutes, you will build a layered defence: Discussion settings, a keyword blocklist, pingback shutdown, a honeypot snippet, server-level rules, and — only if needed — free Cloudflare Turnstile. No monthly fee, no plugin, no comment sent to someone else’s server.
How to Block Spam Comments in WordPress Without Plugin: Layer 1 — Discussion Settings
Open Settings → Discussion in your dashboard — the strongest free anti-spam tool you already own, and it takes five minutes.
Approve first-time commenters. Under “Before a comment appears,” check Comment author must have a previously approved comment. A newcomer’s first comment waits in your queue; once you approve one, later comments publish instantly.
Hold link-heavy comments. Set Hold a comment in the queue if it contains X or more links to 1. The default is 2, which lets one-link spam through. Quirk: 0 switches the check off entirely, so it is the least strict option. With 1, any comment with a link waits for approval — and real readers rarely link in a first comment.
Close comments on old posts. Check Automatically close comments on articles older than and set it to 60 days. Bots love old posts because nobody watches them.
Layer 2: Build a Disallowed Comment Keys Blocklist
Scroll down the same page to two text boxes: Comment Moderation and Disallowed Comment Keys. They behave very differently — mixing them up is the most common mistake in WordPress comment moderation settings.
Comment Moderation keys hold a comment for review — use this box for suspicious-but-possible words. Disallowed Comment Keys delete matches immediately, with no notification, so use it only for terms you are certain you never want on your site.
Both boxes match words, phrases, IPs, and emails, one per line — even inside other words, so avoid short fragments. Seed your Disallowed list with these terms from nearly every spam wave:
- casino, poker, slots
- crypto signals, bitcoin doubler
- payday loan, viagra
- cheap rolex, buy followers
Paste them one per line, save, then use Check past comments against moderation list to run the new rules over your existing queue.
Layer 3: Disable Pingbacks and Trackbacks
Pingbacks and trackbacks notify you when another site links to your post. In practice, spammers fake them to plant links, and most owners never read them.
Turn them off. In Settings → Discussion, uncheck Allow link notifications from other blogs (pingbacks and trackbacks). For existing posts, close them with a bulk edit from the Posts screen. Pair it with our guide on how to disable XML-RPC in WordPress and you shut two bot doors at once.
Layer 4: Add a Honeypot and Time-Check Snippet
Settings and blocklists catch most spam, but a determined bot can still submit your form. This layer catches bots by behavior, with a snippet in your child theme’s functions.php.
A honeypot is an invisible field that only bots fill in. Humans never see it; bots fill in every field they find. A time-check works the same way: no human posts a thoughtful comment three seconds after a page loads.
add_action( 'comment_form', function() {
echo '<p style="display:none;"><input type="text" name="website_confirm" value="" /></p>';
echo '<input type="hidden" name="comment_time" value="' . time() . '" />';
});
add_filter( 'preprocess_comment', function( $commentdata ) {
if ( ! empty( $_POST['website_confirm'] ) ) wp_die( 'Spam detected.' );
if ( ( time() - (int) $_POST['comment_time'] ) < 5 ) wp_die( 'Submitted too quickly.' );
return $commentdata;
});
Keep the threshold low — five seconds is plenty. And never name the field “honeypot” — bots are learning to skip fields with that name.
Layer 5: Rate-Limit Spam at the Server Level
If one IP hammers your comment form, stop it before WordPress loads. On Apache, block repeat offenders by IP in .htaccess — WordPress shows each commenter’s IP in your spam queue:
<RequireAll>
Require all granted
Require not ip 203.0.113.45
</RequireAll>
Server rules are the layer most rival guides skip — blocked requests never reach WordPress. If the same bots hammer your login page, our guide on how to limit login attempts in WordPress without a plugin covers the same technique for wp-login.php.
Layer 6 (Optional): Add Free Cloudflare Turnstile
If spam still leaks through, add one automated gate: Cloudflare Turnstile, a free CAPTCHA alternative that checks visitors in the background — most never see a puzzle.
The setup takes about five minutes. Create a free Cloudflare account, add a Turnstile widget for your site and secret keys, then install the free Simple CAPTCHA with Cloudflare Turnstile plugin, paste in both keys, and switch on the comment form. The free plan covers up to 20 widgets with unlimited challenges, and the plugin has 200,000+ active installs. Treat it as the optional last layer — most sites never need it.
Two Gotchas Most Guides Never Mention
Attachment pages have comment forms too. Every image you upload gets its own attachment page — and by default, comments are open on it. Bots find these rarely watched pages, so check a few and close comments on them. This is the quiet spam door most owners never think to lock.
Akismet has a privacy trade-off. Akismet is WordPress’s built-in spam filter — but it checks every comment against Automattic’s servers, so your visitors’ data leaves your site. It is free only for personal blogs; commercial sites need Pro, around $9.95 per month billed annually (pricing checked in 2026).
No-Plugin Methods vs Spam Plugins
| Method | Cost | Stops bots before submit? | Sends data off-site? |
|---|---|---|---|
| Discussion settings | Free | No — holds for review | No |
| Disallowed Comment Keys | Free | No — deletes on match | No |
| Honeypot + time-check | Free | Yes | No |
| .htaccess rate limiting | Free | Yes | No |
| Cloudflare Turnstile | Free | Yes | Yes (Cloudflare) |
| Akismet | Free personal; ~$9.95/mo Pro | No — filters after submit | Yes (Automattic) |
The layered no-plugin approach beats any single plugin for most small sites.
Frequently Asked Questions
Can I stop WordPress spam comments without a plugin?
Yes. Tighten Settings → Discussion (first-time commenter approval, link threshold of 1, close comments after 60 days), seed the Disallowed Comment Keys blocklist, disable pingbacks, and add a honeypot snippet. That stops the vast majority of comment spam with no plugin at all.
Why do I get so many spam comments on WordPress?
Because bots scan the web for WordPress comment forms automatically — one script can attack thousands of blogs at once, chasing the backlink in your comment section.
Should I disable comments on WordPress?
Only as a last resort. Comments build community and give Google fresh content. Try the layered approach first — most sites cut spam by 90% or more.
What is Akismet?
Akismet is the anti-spam service bundled with WordPress, built by Automattic. It checks every comment against a global spam database. It is free for personal blogs; commercial sites need a paid plan from around $9.95 per month (pricing checked in 2026). The trade-off is privacy: every comment is sent to Automattic’s servers.
How do I block comments with certain words?
Go to Settings → Discussion and scroll to Disallowed Comment Keys. Add one word or phrase per line — casino, crypto signals, payday loan. Matches are deleted immediately, so use this box only for words you are certain you never want; if unsure, use Comment Moderation instead. WordPress’s own comment moderation documentation explains both boxes.
Conclusion: How to Block Spam Comments in WordPress Without Plugin — Start Tonight
Learning how to block spam comments in WordPress without a plugin is not about one magic setting. It is about layers: Discussion settings catch the lazy bots, the blocklist deletes the known junk, disabling pingbacks closes a forgotten door, the honeypot traps the clever bots, and server rules stop the stubborn ones before WordPress wakes up.
Do the first three layers tonight — 15 minutes, and most of your spam is gone by tomorrow morning. Then add the code and server rules when you have a quiet half-hour.
For deeper hardening beyond comments, start with our WordPress security pillar guide, or reach out via our services page or contact page and we will help you lock it down.