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.
Eyedropper is a useful little program which I couldn’t be without. It will tell you the hex, RGB or CMYK of any colour on screen if you hover your cursor over it, and so is invaluable for web development. Many people use Colorzilla for this, which is a Firefox plugin. However, the advantage of Eyedropper is that it works anywhere on screen, not just inside the browser window.
In addition, it also gives you the x and y mouse coordinates, which is very useful for checking that things line up properly. The program is very small and unobtrusive, it sits in the systray until you double-click the icon to pick it up. Then it will follow your cursor around, until you double-click its icon in the systray again to put it back. (more…)
Here’s something useful – repository of logins and passwords for many different sites: www.bugmenot.com
It’s very handy for sites such as Stock Xchng (royalty free stock photos), Youtube, or the New York Times. Or really any site which tries to glean personal information for no real reason.
They also have a ‘disposable email’ feature for creating temporary email address. This enables you to sign up to sites you know will send you spam, without divulging your personal email address.