Sunday, January 22, 2006

How to hide your e-mail address from spambots

Download Squad had something on ways to hide your e-mail address from spambots the other day, which made me wonder why people would go to such great lengths (using an image file instead of text or even letting people enter a code/phrase before showing the address) when there's a much easier way to avoid spam. And no, I'm not talking about substituting AT for @ or anything like that, which is nothing more than an annoyance on the user's side.

You just have to use html-encoded characters.

On my site Trier Daily Photo, which has become moderately popular in the last few days, so I'm assuming the spambots are all over it, I give my e-mail address clear for all to see. Only that I don't.

The exact line of code I use is this:
<a href="mailto:s.nebel+tdp&#64;gmail.com">eMail</a>
which directly translates to this:

eMail

If you hover over that link, you will notice that your browser (and subsequently your e-mail client, as well) automatically converts the html-encoded &#64; to @, a feat that spambots apparently can't master. Users can use the address without having to change or deobfuscate it, while spammers don't even recognize it as an e-mail address at all.

I've set up a filter in Google Mail that labels all mails sent to s.nebel+tdp, even spam, with a special label. So far, no spam has been sent to that address. And I have been using the same system on other websites to the same result.

0 comments: