Skip to content

wordpress

Fighting AI-generated comment spam on WordPress

Recently, I’ve been getting a new type of comment spam on my blog.

The comments are surprisingly relevant to the articles they’re posted on. They refer to the actual content of the blog post, use appropriate terminology and even sound as though someone has taken the time to read what I wrote.

Except they have that familiar, bland, generic style of AI-generated text. They say something vaguely positive about the article, perhaps add a superficial observation, and then include a link.

The link is the whole point.

I suspect these comments are generated by large language models (LLMs). Rather than posting the same generic spam message everywhere, spammers can now generate a superficially relevant comment for each individual blog post. That makes the comments harder to distinguish from genuine contributions using simple content filters.

I don’t particularly mind whether someone uses AI to help write a comment. What bothers me is using AI to manufacture plausible-looking comments solely to smuggle promotional links onto other people’s websites.

So I decided to address the actual problem rather than trying to determine whether a comment was written by a human or an AI.

No URLs in comments

My solution is straightforward: comments on my blog are no longer allowed to contain URLs.

I use the Code Snippets plugin to add a few small PHP snippets to WordPress.

The first removes the Website field from the comment form. The second rejects comments containing URLs. Another one prevents comment authors’ names from linking to their websites, including when older comments already have a URL stored in WordPress. And finally, comments are disabled on any post older than 180 days.

This doesn’t stop bots from submitting AI-generated comments. They can still generate text that refers to the article, praise the author and imitate the style of a genuine discussion.

But they can’t use the comment to publish their spammy links.

That’s the distinction I care about. I don’t need to identify every spammer or build a perfect AI detector. I just need to remove the incentive for this particular kind of spam.

If someone genuinely wants to contribute to a discussion, they can still do so. They simply can’t use my comment section as a vehicle for link promotion.

A small, pragmatic solution

This isn’t a universal solution to comment spam. Spammers can adapt, and not every unwanted comment contains a URL. The URL detection is also based on pattern matching, so it isn’t foolproof.

But it addresses the behaviour I’m actually seeing, without adding another dedicated plugin or trying to outsmart the latest AI-generated text.

If the bots want to keep writing bland, AI-generated comments about my blog posts, they’re welcome to try.

They just won’t get to leave their links.

The actual PHP code is left as an exercise to the reader.

25 Years of amedee.be – A Quarter Century Online 🎉

Today marks exactly 25 years since I registered amedee.be. On 12 December 2000, at 17:15 CET, my own domain officially entered the world. It feels like a different era: an internet of static pages, squealing dial-up modems, and websites you assembled yourself with HTML, stubbornness, and whatever tools you could scrape together. 🧑‍💻📟

I had websites before that—my first one must have been around 1996, hosted on university servers or one of those free hosting platforms that have long since disappeared. There is no trace of those early experiments, and that’s probably for the best. Frames, animated GIFs, questionable colour schemes… it was all part of the charm. 💾✨

But amedee.be was the moment I claimed a place on the internet that was truly mine. And not just a website: from the very beginning, I also used the domain for email, which added a level of permanence and identity that those free services never could. 📬

Over the past 25 years, I have used more content management systems than I can easily list. I started with plain static HTML. Then came a parade of platforms that now feel almost archaeological: self-written Perl scripts, TikiWiki, XOOPS, Drupal… and eventually WordPress, where the site still lives today. I’m probably forgetting a few—experience tends to blur after a quarter century online. 🗂️🕸️

Not all of that content survived. I’ve lost plenty along the way: server crashes, rushed or ill-planned CMS migrations, and the occasional period of heroic under-backing-up. I hope I’ve learned something from each of those episodes. Fortunately, parts of the site’s history can still be explored through the Wayback Machine at the Internet Archive—a kind of external memory for the things I didn’t manage to preserve myself. 📉🧠📚

The hosting story is just as varied. The site spent many years at Hetzner, had a period on AWS, and has been running on DigitalOcean for about a year now. I’m sure there were other stops in between—ones I may have forgotten for good reasons. ☁️🔧

What has remained constant is this: amedee.be is my space to write, tinker, and occasionally publish something that turns out useful for someone else. A digital layer of 25 years is nothing to take lightly. It feels a bit like personal archaeology—still growing with each passing year. 🏺📝

Here’s to the next 25 years. I’m curious which tools, platforms, ideas, and inevitable mishaps I’ll encounter along the way. One thing is certain: as long as the internet exists, I’ll be here somewhere. 🚀

Hello (again) world!

Het werd stilaan wel eens tijd om iets te doen aan de blog die in de lappenmand lag. Normaal gebruik ik Drupal voor websites, maar fsck it, deze keer wil ik alleen maar een simpele blog. Dus WordPress. Sorry Dries, ik ga niet met een kanon op een mug schieten.

In de komende dagen ga ik uitzoeken hoe ik blogposts kan migreren van Drupal naar WordPress. Desnoods is ‘t copy/paste van de Wayback Machine.