Can WordPress blacklist words? Yes! Stop spam and save time.

Disclosure: This post contains affiliate links. I may receive compensation when you click on links to products in this post. For an explanation of my Advertising Policy, visit this page. Thanks for reading!

Use WordPress to blacklist words and save time dealing with spam.

If blog commenting is a vital part of your blog on your WordPress website, then of course dealing with spam can become almost a day today chore. 

Furthermore, if you are only using the free version of Akismet, then you are just barely doing the minimum. 

The truth of the matter is, that the more comments that your blog gets, the more chances of nefarious links, use of bad language, etc. becomes more prevalent. 

As a result, your comments section can turn into quite the sewer of your blog. A literal ghetto which can detract from your blog and website’s mission. 

Keeping on top of bad language, links and bad words requires that you implement on your WordPress blog, a blacklist of words. 

In this post, I will show you how implementing a blacklist of words and phrases can save yourself enormous amounts of time and effort while keeping your WordPress blog commenting section clean and constructive. But how? 

You can first collect a list of bad words, bad language, potential link spam, etc. and copy it into your WordPress blog. 

Next, you can use WordPress’s own comment filtration system in your dashboard to place your blacklist of words. 

However, sometimes that might not be enough. 

I will also give you a set of WordPress plugins that you can use to help blacklist many words, phrases and other harmful language as well as potentially harmful link spam to protect your WordPress website as well.

WordPress plugins that can blacklist words.

Here is a list of WordPress plugins that can not only help you blacklist words and other language that can be harmful to your WordPress website, but can also help control and keep the spam on your WordPress website at bay as well.

How to implement a WordPress blacklist of words without a plugin.

You may not need to add any extra plugins to help you implement a WordPress backlist of words.

In fact, inside your WordPress dashboard there is a section where you can paste a list, a blacklist of words and phrases which will force WordPress to block words and/or delete such content from being published in your blog’s comments section. 

To access this WordPress feature on your blog. Simply go into your blog’s dashboard. On the right column, look for settings. Then under settings, click discussion.

In your Discussion settings you’ll find two boxes.

In the “Comment Moderation” box below, you can choose to hold a comment and put it into a queue to manually moderate it. This will not automatically delete any comments, just hold them. You will need to manually decide whether or not to delete the comment.

In this “Disallowed Comment Box” below is where you can put or paste a “blacklist” of words, phrases, IP addresses,URLs, author names etc. 

By doing so your WordPress blog will automatically block any comments containing any of the words, phrases etc. from appearing in your blog’s comments automatically, with no assistance needed from you.

This should obviously be the first step along with implementing Akismet’s free version. 

In fact, if your comments section hasn’t become a major headache for you and you just want to nip things in the bud before they become a problem. 

This simple WordPress solution should help you implement a blacklist of words and prevent comments spam and vulgar language from entering your comment sections.

How to come up with a list of words to blacklist.

I’ve got you covered here. There is a huge list that you can copy from this text document from GitHub

It’s literally got thousands of potentially harmful words and phrases that you can simply copy and paste into your plugin or in the WordPress “Disallowed Comment Box” in the Discussion settings section in your WordPress blog’s dashboard. 

However, since each blog and website is different, you may want to add or even subtract some of the words in this list in order to best customize it to your particular blog’s content and subject matter.

Does Akismet blacklist words in WordPress?

Akismet has its own database of not only a blacklist of words, but thousands if not tens or even hundreds of thousands of blacklisted IPs, URLs, words, phrases, links. You name it, Akismet has it in its own database of blacklisted words and phrases. 

This list also continues to grow and refine with every website that is connected to Akismet. It goes from strength to strength. 

So there’s no need to actually download any list or blacklist into Akismet since Akismet has got more blacklisted words than probably any compiled blacklist out there.

How to blacklist comments in WordPress.

The above plugins should also help you blacklist comments in your WordPress site as well as words and phrases.

How to create a comment blacklist template.

If you are comfortable working directly within the files of your WordPress website and you may need to do this since many times it’s not simply trolls leaving these types of comment spam, but automated spam bots.

Legitimate users usually leave comments on your blog using the comment form in the blog post. This requires loading the blog’s comment template (e.g., comments.php), which should be located within the same domain as the blog post. 

After filling out the comment form and clicking “submit”, this then initiates the PHP script that actually processes the comment. In WordPress, the comment processing file is wp-comments-post.php located in the root directory. 

Therefore, the HTTP referrer for all legitimate comments is your domain.

Automated spam robots, on the other hand, typically target the wp-comments-post.php directly, bypassing your comments.php form altogether. This behavior results in comments being sent from an HTTP referrer and not from your domain. 

Therefore, by blocking requests for the wp-comments-post.php that are not sent directly from your domain, you immediately eliminate a large portion of blog spam.

To block spam that targets wp-comments-post.php directly, you should add the following code into your .htaccess.

The only thing you need to do is change the  “yourdomain.com” in line 6 to your own domain.

You will also notice that within this code the wp-login.php is also added to line 5 in the protected file. This can further prevent a spam attack targeting the wp-login.php as well.

Using WordPress to blacklist words, summary.

There you have it. Not only have I shown you how WordPress can blacklist words, But I have also given you additional WordPress plugins you can use to help not only blacklist words, but to fight all kinds of comment spam as well.

In addition I have also given you a huge blacklist of words for your WordPress blog from GitHub. This list was compiled by WordPress experts in order to fight comments spam.

Finally, if you know your WordPress files well enough and can navigate through them without messing up your PHP files, I’ve also given you some code that you can put into your files via .htaccess. 

This code can help prevent the spam that actually bypasses your comments function on your blog and goes straight into your WordPress websites files by automated spam bots.

Good luck! Finding spam as you can see is more than just blacklisting a few words. There’s a whole industry that’s basically built around fighting spam in WordPress that goes beyond a mere blacklist of words.

Web hosting in Iceland - OrangeWebsite.com