Contact Form 7 Spam Prevention with Akismet

A can of spamIf you are familiar with WordPress then most likely you use some type of Contact form and have experienced receiving some type of contact form spam.

One of the best WordPress contact forms (And I have tried several) is Contact Form 7. This plugin has a lot of flexibility. But even in it’s greatness by itself you will still get some contact spam. Yes, you could use a captcha, but if you are like me and don’t like captchas there is a better way. Akismet is one of the very best comment spam plugins you can use on your WordPress site. Using Akismet in combination with Contact Form 7 is the ultimate in spam prevention. But how can you take the power of Akismet in fighting comment spam and use it to fight contact form spam?

In order to set this up you need to make sure you have some things in place:

  1. Install Akismet plugin
  2. Activate your Akismet install with a key
  3. Install Contact Form 7
  4. Activate your Contact Form 7 plugin
  5. Setup your form (or just use the snippet below)
  6. Add the Akismet tags to your contact form

The Code for Contact Form 7 Spam Prevention with Akismet

The real key part of the code is making sure you are adding the “akismet:author” and “akismet:email” to the correct part of the form. You can add this to the default form between the brackets.

If you have any better solutions or if you try this out let me know.

About John Schuster

My passion is helping business owners and entrepreneurs use the internet to find customers and make money. This includes email marketing, social media marketing, content marketing, PPC, and SEO. I work hard to be the best, and with that bring an arsenal of tools to help you business. Call me (206) 235-4131 Please feel free to use me as a resource and contact me with questions.
This entry was posted in Web Development and tagged , . Bookmark the permalink.

Leave a reply