Prevent bots from getting emails from your website

If you write your email on your website most of the time you receive many spams. This is because there are bots out there that scan the net to find emails.

There are some plugins to obfuscate the email, but foxy spammers who know the code of the plugin will be able to code a bot to detect the email even though the emails are obfuscated.

This is why I decided to create Email No Bot.

At the time of writing this blog post, nobody knows this plugin. I’ve published it a few minutes ago. But even if it becomes very popular and spammers study the code of the plugin, I think it’s impossible they can create a bot to detect the emails.

Here you have an example:

b65d84ab65d84a

 

Of course, you will be able to see the email, but if you inspect elements you will see something strange, and nowhere it’s written the email. What you see inspecting elements is what bots see.

The email appears on the screen thanks to the CSS pseudo selector :after.

The CSS rules to output the email have a very random order, and there are some rules that we would not need, it’s just to confuse robots. Everything is very random, and every time you refresh the page the code is always different. If you have a server cache, of course, it will be the same. But it’s enough that the code of your page is not predictable.

You can’t code a bot to detect emails if the code that outputs the email is always different.

The following two images show the code to display the same email.

Imagine you want to code the bot. Which conditions would you give to detect the email?

Downsides

Using this plugin the user will not be able anymore to copy the email. This is of course a limitation, but it’s also the reason why the plugin is so powerful against spambots. It’s up to you to decide if you prefer spams or the ability to copy the email.

Download

You will find Email No Bot on the official WordPress repository, or directly on the page of plugins in your backend.