One sure way of getting more spam is by publishing your email address on a website. The nasty spambots come along, read the email address and then add you to their spam lists.
For a lot of my clients I recommend adding a contact form of some sort rather than having their email address displayed in a clickable/readable form. However, there are always times when a form isn’t desirable.
When it’s necessary to display an email there are a few ways to obfuscate the email so that spambots don’t recognise the email as such. The purpose of this post is to look at some of these techniques and also to test them out. As such I have created four new email addresses that have not been used anywhere else on the Internet and have used three alternate methods of obfuscating the first three with the forth being used as a control. Then we’ll sit back and wait to see if/when I start getting spam, which emails are being used and thus checking which techniques are most effective.
PLEASE NOTE: The emails below are not to be used to contact me (obviously). If you want to contact me the please leave a comment below.
Test one
This email link – obtest1.cgrisr6@anglings.com – has be obfuscated by using ASCII for each character.
This is my preferred method as it doesn’t require JavaScript. Have a look at the source code to see what it looks like.
Test two
This email link – obtest2(); – has been obfuscated using a simple JavaScript that takes the email address in parts and then writes them back to the screen. I’ve used this script a few times in the past.
Test three
This email link – obtest3(); – has been obfuscated using the email obfuscator script by Tim Williams, through a wizard at http://www.jottings.com/obfuscator/. I modified the outputted code slight to also get the JavaScript to encode the displayed email as well as the href.
You can see both JavaScripts by having a look at obtest.js
Test four (control)
This email – [email protected] – is not encrypted at all. Uh oh…
I will post the results in the future.
For Mac OS X users it is surely more convenient to use a Dashboard widget called obfuscatr. It provides JS or just plain encoding of your email similarly to as introduced above.
See the details at flash tekkie.
obfuscatr was also featured in MacWorld Italy of March 2008.