Can you Keep Spam Comments at Bay with Cookies in WordPress?
Web Hosting Topics
Search Posts
WordPress Hosting
WordPress Tutorials
- How & Why You Should Consider an Alternate Header for Your WordPress Theme
Have you heard of people telling you to use alternate headers for your WordPress theme? It may make you reminisce about the times when people would use a different look on each page and how old school this is. Myspace is one spot you may be remembering for a time ...
- What’s a WordPress SEO-Friendly URL Look Like?
Have you ever considered how a URL affects a website’s SEO? It turns out in fact that a URL’s structure is important to SEO and many WordPress users want to know what the best types of SEO permalink structures are made of. Typically the default WordPress URL structure hasn’t been designed ...
- Can you Easily Add Icon Fonts within Your WordPress Theme?
Have you tried to add icon fonts in your WordPress theme? It’s really easy to do if you haven’t tried it yet. As long as you know how to do it, it’s really easy to add to your theme. Your new icon fonts will allow you to add vector icons ...
- Fixing and Removing Broken Links on a WordPress Website
If you’ve run into trouble with broken links on your WordPress website, you are not alone. You can now remove or fix the broken links with this helpful guide on where to begin. Finding a broken link that leads you to one of those “404 errors” may make you panic, ...
- Can you Create a Great Coming Soon Page in WordPress?
When you’re getting ready to launch a new website, building a “coming soon” page is probably on your mind. It’s a great way to launch the website with a bang rather than to prevent momentum from building. How can you make it a great user experience until your WordPress site ...
- How & Why You Should Consider an Alternate Header for Your WordPress Theme



Spam comments are a huge problem for some WordPress users. As your site grows, spamming programs will find you and start to target your site with unwanted comments.
There are some great ways to block spam including the Akismet plugin and adding a CAPTCHA plugin to your site. However, these are not the only ways to block spam. You can also do it through Cookies.
Using the Cookies for Comments WordPress Plugin
The Cookies for Comments WordPress Plugin can help eliminate spam comments from your WordPress website. Install and activate this plugin and it will work right out of the box. You won’t need to configure anything or change any settings.
How does the Plugin Work?
Most of the spam comments you receive don’t actually come from an actual person. Instead, they come from spam bots. These bots are actually software scripts that spend their time looking for comment forms and posting comments. Since these programs are used to submit thousands of comments, they don’t load images or stylesheets from websites. They just load the text to figure out if there is a form for a comment.
When you install the Cookies for Comments plugin, it will load an image or stylesheet on a page when it has been accessed. When this happens, the user’s browser will install a cookie. If a user tries to post a comment and the cookie isn’t present, the plugin will identify them as a spam bot. The comment will also be marked as spam and submitted as spam.
Can you Completely Block them From Posting a Comment?
If you want to use this plugin and completely block the spam bots, you will need to change a little bit of code. This is done by finding the cookies, which you can do by right clicking on your website and selecting “view source” from the menu.
Now, you will have a new tab open with the code for your website. You will need to scroll to about the middle of the source code and look for a code that looks like this:
The cookie value is the string of number and letters found after the css.php?k=. In the code above it is, 9634eab89e9d848c824a68ddc6118c93.
You will need to connect to your website with your FTP client and edit the .htaccess file. You will just need to enter this code before anything else in this file to block spam comments with this plugin completely.
Replace the strings of XXXXX with your cookie value.
If you follow these steps and use the cookies for comments plugin, you will be able to block the comments coming from spammers in WordPress.
Related Web Hosting Articles: