How You Can Stop Spam using Honeypot Anti-Spam Technique

Honeypot Anti-Spam Technique

Spam bot is one one the most annoying problem we encounter with the forms on our websites. Dealing with spam bot is no simple feat and that is where the Honeypot Anti-Spam Technique comes in.

When we talk about spam bots, Google Recapatcha always comes into our mind to fight them however spam bots are not created equally. Some of the spam bots are smarter and able to bypass Google recapatcha.

What is Honeypot Anti-Spam Technique?

Honeypot Anti-Spam technique is a method to fool spam bots when they automate the filling of your website form.

How do I implement Honeypot Anti-Spam Technique to my form?

Implementation of Honeypot Anti-Spam Technique varies to whatever website form you are using but the approach is quite similar.

In order to implement Honeypot Anti-Spam Technique to your form, what you will need to do is create a hidden field. The hidden field will be used to fool the spam into filling them and be rejected.

For this first example, we will be using a generic HTML FORM.

Below is a typical contact form that is composed of name, email, message field, and submit button

<form method="get" action="/">
<input type="text" placeholder="name" id="name" />
<input type="text" placeholder="email" id="email" />
<input type="text" placeholder="message" id="message" />
<input type="submit" value="Submit" />
</form>

If you implemented the Honeypot Anti-Spam Technique, the form will be updated into below

<form method="get" action="/">
<input type="text" placeholder="name" id="name" />
<input type="text" placeholder="email" id="email" />
<input type="text" placeholder="message" id="message" />
<input type="text"  id="catch" />
<input type="submit" value="Submit" />
</form>

Notice the input field with an ID of catch.

The input field with an ID of the catch is the field that will be used to fool spam bots. The field will be hidden using a custom CSS

#catch { display:none}

and a jQuery will be executed to trigger the Honeypot Anti-Spam Technique into stopping spam bots.

<script>
$('form').submit(function(){    
        if ($('#catch').val().length != 0) {
            return false;
        } 
});
</script>

The jQuery script tells that if the value is not empty, then the form submission will not be executed.

Spam bots auto-fill form fields while real people who use the form will always have the “catch” field always set to empty since they cannot see it.

Easier way to implement Honeypot Anti-Spam technique

If you are using a WordPress website, there is an easier way to implement it.

Using a popular form builder like Gravity Form, allows you to build form easily and all you need to implement the Honeypot Anti-Spam technique is to tick the honeypot anti-spam in the form option settings. You can check more about the Gravity form in our article Top Best Recommended Form Builders for Building Forms.

Commonly Asked Questions about Honeypot Anti-Spam technique

These are the most commonly asked question about the Honeypot Anti-Spam technique.

Do I Still Need Google Recaptcha if I have the Honeypot Anti-Spam technique integrated into my form?

You can still have Google Recaptcha but if you want a visually appealing form, you can disable the Google Repacatcha and use the Honeypot Anti-Spam technique alone.

Which is better, Google Recaptcha or Honeypot Anti-Spam?

Having both Google Recaptcha and Honeypot Anti-Spam is the best of both words against spam bots.

What are the disadvantages of Honeypot Anti-Spam Technique?

Honeypot Anti-Spam technique is limited to autofill spam bots. If you are running a WordPress website, using an anti-spam plugin would definitely help you fight spam bots.

Final thoughts on the Honeypot Anti-Spam technique

The Honeypot Anti-Spam technique is a good method of preventing spams bots. Implementation varies from one form builder to another but some form builders include the honeypot anti-spam feature. The Honeypot Anti-Spam technique can also be implemented in email marketing automation and some email marketing app offers free guide how to implement it to their form.

If you are not sure how to implement the Honeypot Anti-Spam technique to your form on your website, please feel free to contact us.

Leave a Comment