How accurately can you line things up by eye, without using any tools?
Find out on this quiz: The Eyeballing Game.
It’s often useful to have your email address proudly displayed on your website, with a handy little ‘mailto’ link to make things easier for your users. However, doing this is often an open invitation for spammers to ‘harvest’ your email address and use it to bombard you with unwanted nonsense.
They do this by using a spambot program which searches for likely looking combinations of letters. Since email addresses have to have an @ symbol, often they will look for this character and grab the text on either side, in the hope that it will be a valid email address.
A common way of getting around this to replace the ‘.’ and ‘@’ with ‘dot’ and ‘at’, or by putting in some extra text which will be obvious to a human reader, but will render it unusable for a spambot. For example, with ‘nameREMOVE@domain.com’, the ‘REMOVE’ text should be deleted.
Images can also be used to safely display the email address. This technique involves creating a graphic with the desired email address displayed, and saving it as a .gif or .jpg file. Though this can look effective, it does mean the address won’t be clickable.
Though they do work, none of these methods are especially professional solutions. Here are some quick alternatives…
Using CSS
Css can be employed to display the email address backwards in the code, but forwards on the page itself. Unfortunately, this neat solution doesn’t work in older browsers.
HTML:
<div class=”backwards”>email@address.com</span>
CSS:
.backwards { unicode-bidi:bidi-override; direction: rtl; }
Using Javascript
This technqiue breaks up the code with Javascript, so although it will display properly on the page it is hidden from spambots. This is probably the most common method of email obfuscation, but I’m not sure how effective it is these days, as newer spambots seem to trawl through Javascript as well.
<script language=”javascript”>
var user = “name”;
var domain = “domain.com”;
var display = user + “@” + domain;
document.write(”<a hr” + “ef=m” + “ai” + “lto:” + user + “@” + domain + “>” + display + “</a>”);
</script>
Using Enkoder
Enkoder is a handy tool which creates some crazy encrypted Javascript. The method is basically the same as above, but the code generated is far more unreadable. It also has options for editing the subject line and link title for your email anchor.
Although no method is 100% effective against the spammers, these methods should at least make things as difficult as possible.