Hiding an email address from spam harvesters
Using a little css trickery, you can completely hide your email address from spam harvesters. The drawback to this approach is that it will only work on sites that read left-to-right as it uses CSS to reverse the direction of text.
Add this class somewhere in your CSS file.
span.reverse { unicode-bidi: bidi-override; direction: rtl; }
At the point that you are ready to present the email address, code it in your HTML, but just key it in backwards. For example:
<span class="reverse">moc.rehtrebttam@retsambew</span>
The CSS above will then override the reading direction and present the text to the user in the correct order.
Pretty clever technique.
Interesting Finds: January 16, 2009…
…
Clever, but does it work? I mean, does it actually fool spammers?
@tim: It works in so far as the spam bots will be unable to harvest the address.
Very nice! I’ll try this out.
mattberther.com ยป Hiding an email address from spam harvesters…
Thank you for submitting this cool story – Trackback from DotNetShoutout…
I’ve tried it out and it works immacutely in every browser I’ve tried (apparently it’s a well-supported bit of css).
But, it causes a couple of problems – for example if you copy and paste the email address (e.g. into your email client) it comes out backwards i.e. moc.rehtrebttam@retsambew.
It’s also quite difficult to select the text for copying in the first place; depends on the browser but in IE6 I end up selecting nothing or the entire page.
And the browser’s text search won’t find anything if you search for the forwards version of the email address.
But it’s the copy-and-paste thing which is a bit of a killer – if you’ve got an email address in your web page without a mailto link, then copying it is exactly what your users will want to do.
This is going to work but not for long, cause the pattern still gives the spammer crawlers hints that it’s absolutely a reversed email. I think JavaScript solutions are the best when you want to provide a copy-and-pastable email address.


