Others

How To Effectively Prevent Web Form Spam

Getting your Trinity Audio player ready...

Today we are going to discuss a few ways to prevent web form spam which we are sure is a problem faced by many webmasters. The captcha code may be the best solution to avoid autofill forms spamming on websites. It can control spams on all kind of website forms the like contact form, quote form, message form, blog comments, etc.

By using captcha, google captcha or any other captcha script you can stop spam on types of forms. You can also generate captcha images using PHP captcha.

Some captcha is made by complex images or even patterns to validate the form.

Below are a few optional ways to avoid spamming.

  1. Coerce registered users into verifying their email address before posting some content to your website.
  2. Some forms allow placement of a hidden field that is designed to be blank but automated submission robots don’t know this and will often try to fill it out anyways. When they submit the form with this “bot trap” field filled in, it will prevent submission.
  3. There are third party services ( like Askimet ) that can be used to detect spam. These third party services check spam against their API over submission of forms.
  4. Server side strong validation of forms to check if an email address exists within the system and application or not. Use PHP default filters for validation.
  5. Hide your forms from google search engine using robox.txt
  6. Use some conditional logic for contact forms or registration form like payment fees for registration or something like that. It will be more useful.
  7. Another way is to substitute the “@” and “.” symbols from your email with words – for example <youremail> (AT) <something> (DOT) <com> – i.e support (at) Mysite (dot) com.You can safely post your email address as an image that can be created with any PHP code.
  8. Restrict user for 1 entry/1 day(per IP address). You can get user IP address using PHP function $_SERVER[‘REMOTE_ADDR’] and the restricted user can fill only one entry from one IP in a single day.
  9. For WordPress websites, there are so many plugins readily available. These plugins for site security efficiently help in preventing spammers.
Interested & Talk More?

Let's brew something together!

GET IN TOUCH
WhatsApp Image