loading...

Here’s how you can Ban the Spam

BY Christo Mabbs

{Front-End Web Developer}

23 October 2018

Reading Time: 3 minutes

Don’t take spam personally, it comes from an army of faceless robots hell-bent on contacting you about their advanced marketing techniques and male enhancement pills. These nasty robots crawl the internet looking for any way to contact you because that’s what they were trained for.

While all on the same mission, they all have different strategies for reaching you. But if you learn the way these robots work you can beat the odds and Ban the Spam.

Plain Text Email Addresses

Some robots are great at finding websites and scanning them for email addresses. Once found, those email addresses then get added to a mass spam mailing list.

Unfortunately, there isn’t much you can do to avoid robots from finding your website and scanning it. There are two solutions to stop robots from finding and reading your online email address though: using a contact form and/or email obfuscation.

Contact Forms are a relatively simple and standard website feature, especially if you’re using a popular CMS such as WordPress. Many plugins offer this functionality and the styling generally fits into the website without too much tweaking required.

If you absolutely need to list an email address and can’t get away with using a form you can obfuscate the email address. This is a technique that makes the address easy to read for humans but difficult to read by robots. Several WordPress plugins offer this service, but for those more tech savvy here is a little code snippet we use to make this happen here by using PHP and javascript.

Website forms

Ever after converting your plain text email address to a contact form, you can just as easily find yourself having to deal with another problem: the form spam robot.

These robots scan websites for forms and fill out fields based on field names, labels and patterns. Think of it like the browser form autofill feature, that fills out forms automatically with your personal information. Plugins such as Contact Form 7 and Gravity Forms can make this process even easier, by creating patterns that these robots can easily detect and take advantage of.

The solution for the form spam is to use either human verification or honeypots. Human Verification requires a user to authenticate who they are through some technique that is very difficult for a robot. Some fairly common examples of these are Google’s reCAPTCHA or using a simple math question with back-end login on form submission.

Google reCAPTCHA

Honeypots work in almost the opposite way, by creating a field that should never be filled out by a human. This field is often obscured from human view or otherwise given a title that warns users not to fill them out. If the field is filled out the form knows not to submit the information as it is most likely spam.

MailChimp Embedded Form

Locking Down the Hatch

The final step you can take is to tighten up the settings on your email server to block spam. Services such as Microsoft Server, Gmail and many more allow for custom spam filter settings. Have a play with these settings and be sure to target any common spam patterns you’re noticing if possible. Some of these patterns might be keywords, the sender’s email address or the mail server IP address.

When tightening up spam filters be sure to create a “rejection message” that lets users know that their message has been rejected for a certain reason. Also be sure to check your spam folder regularly, you might find things are accidentally being sent there!

Spam is multi-million dollar industry and it’s not going away any time soon. But by knowing how these robots work you can stay on top of things and beat the spam.

Like what you see?
Subscribe now to receive regular updates

MORE ARTICLES LIKE THIS