When displaying an e-mail address on a website you obviously want to obfuscate it to avoid it getting harvested by spammers. But which obfuscation method is the best one? I drove a test to find out. Here are the results:
In 2006 I opened nine different e-mail addresses. On this page I published the nine e-mail addresses. But every address has been obfuscated by a different method. I made sure it’s getting indexed by Google by putting a link to that page on the tilllate.com homepage.
Then I waited 1.5 years (see the original post).
For each e-mail address I counted the amount of spam I received. The amount of spam received started by 21MB (for no obfuscation and a total of over 1800 spam mails) and went down to absolutely no spam.
The following three methods are absolutely rock-solid and keep your addresses safe from the harvesters.
1. Changing the code direction with CSS
Here’s how you do it:
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-wp-preserve="%3Cstyle%20type%3D%22text%2Fcss%22%3E%0Aspan.codedirection%20%7B%20unicode-bidi%3Abidi-override%3B%20direction%3A%20rtl%3B%20%7D%0A%3C%2Fstyle%3E" data-mce-resize="false" data-mce-placeholder="1" class="mce-object" width="20" height="20" alt="<style>" title="<style>" /> <span class="codedirection">moc.etalllit@7raboofnavlis</span>
2. Using CSS display:none
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-wp-preserve="%3Cstyle%20type%3D%22text%2Fcss%22%3E%0Ap%20span.displaynone%20%7B%20display%3Anone%3B%20%7D%0A%3C%2Fstyle%3E" data-mce-resize="false" data-mce-placeholder="1" class="mce-object" width="20" height="20" alt="<style>" title="<style>" /> silvanfoobar8@<span class="displaynone">null</span>tilllate.com
3. ROT13 Encryption
ROT13 encode the e-mail address with this tool or use the str_rot13 function of PHP and decode it via Javascript.
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-wp-preserve="%3Cscript%20type%3D%22text%2Fjavascript%22%3E%0Adocument.write(%22%3Cn%20uers%3D%5C%22znvygb%3Afvyinasbbone10%40gvyyyngr.pbz%5C%22%20ery%3D%5C%22absbyybj%5C%22%3E%22.replace(%2F%5Ba-zA-Z%5D%2Fg%2C%20function(c)%7Breturn%20String.fromCharCode((c%3C%3D%22Z%22%3F90%3A122)%3E%3D(c%3Dc.charCodeAt(0)%2B13)%3Fc%3Ac-26)%3B%7D))%3B%0A%3C%2Fscript%3E" data-mce-resize="false" data-mce-placeholder="1" class="mce-object" width="20" height="20" alt="<script>" title="<script>" />silvanfoobar's Mail</a>
Thanks, Christoph Burgdorfer for this idea.


Pingback: Thomas Kahl persönlicher Blog » Emailadresse anzeigen und Spam verhindern
Pingback: michaelwales.com » Email Obfuscation
Pingback: 9 metodi per offuscare gli indirizzi mail / Melodycode.com - Life is a flash
Pingback: roScripts - Webmaster resources and websites
Pingback: FuzzLinks.com » techblog.tilllate.com » Nine ways to obfuscate e-mail addresses compared
Pingback: Emailadressen auf Webseiten codieren | Technik, Gothic und Anderes
Pingback: Quelle est la meilleure façon de cacher un email pour éviter le SPAM | Korben
Pingback: Блогът на Линковете - Защитаване на публикуваните е-майл адреси от спам
Pingback: Ocultar las direcciones de email a los bot spammers | eleZeta - Lucas Zallio
Pingback: Three Best Ways To Obfuscate Email Addresses | Hackosis
Pingback: Webmaster Tools: keeping spam down at Just a Blog Site
Pingback: Impressum? | kip's weblog
Pingback: 9 méthodes pour protéger les adresses emails en ligne
Pingback: Pages tagged "email"
Pingback: hype.yeebase.com
Pingback: This Weeks Top 5 Links | devjargon
Pingback: …weil ich CiT bin! » Langzeitstudie zur Spam-Abwehr
Pingback: How to hide your email address from spammers - Graphic Design Forum and Web Design Forum
Pingback: Netzbürger Brenrhad
Pingback: Web Dev Bros » Blog Archive » Methods for hiding/obfuscating emails in your website
Pingback: Relativ wirksamer Spam-Schutz - Netzlogbuch
Pingback: EGM Weblog » Spam-Schutz für E-Mail-Adressen
Pingback: PHP Blogger: Email-Adressen effektiv verschlüsseln - Ein PHP Blog auf deutsch
Pingback: Welcome to my world! » Blog Archive » Convert email addresses in source HTML to images without modifying the source?
Pingback: 9 Techniken um E-Mail-Adressen gegenüber Adresssammlern zu verschleiern im Vergleich « Kreativrauschen
Pingback: Mailadresse verschleifern
Pingback: Accomplishing Accessible Email Obfuscation | .eduGuru
Pingback: Dev, Linux, Tech and Co » Affichez vos emails tout en évitant le spam !
Pingback: E-Mail in Javascript verstecken? - XHTMLforum
Pingback: Two easy ways of obfuscating your email address with CSS | AI NO TENSHi
Pingback: E-mail-Adress-Obfuscation und Spam - XHTMLforum
Pingback: Thinkubator - A Thoughtprocess Interactive Blog » Blog Archive » Most effective ways to obfuscate email addresses
Pingback: How can I protect e-mail addresses on my website from being harvested by spammers? « Dodona gives you answers
Pingback: Email Obfuscator Using HTML Numeric Character References, CSS, and JavaScript | Pixel Wise Design
Pingback: 10 Essential Website Checks « Erich sieht
Pingback: Obfuscate no more: why your email address should go au naturale - Jason Priem
Pingback: Email-Adressen auf (Blog-)Webseiten anzeigen « Tag4Tag
Pingback: Protecting Email Addresses Online | Larry Ullman's Blog
Pingback: E-Mail Schutz für WordPress (mit Plugin) - codeschnipsel, CSS, E-Mail, PHP, Plugin, Schutz, Spam, Wordpress - ocean90s weblog
Pingback: 50 New CSS Techniques For Your Next Web Design - Programming Blog
Pingback: CSS Vault Blog » Blog Archive » 5 Great CSS Techniques To Improve Your Website
Pingback: 50 New CSS Techniques For Your Next Web Design | Desinine
Pingback: Sähköpostiosoitteen salaaminen boteilta « it.tassu.org
Pingback: E-Mail Schutz für WordPress (mit Plugin) » codeschnipsel, CSS, E-Mail, PHP, Plugin, Schutz, Spam, Wordpress » ocean90s weblog
Pingback: 50 New CSS Techniques For Your Next Web Design « Photoshop.vn – Your Design Resource
Pingback: 5 Great CSS Techniques To Improve Your Website :: Graficznie
Pingback: Sicherheit Email-Versand - SSL Zertifikate und PGP - Seite 2 - php.de
Pingback: E-Mail Schutz für WordPress (mit Plugin) » Codeschnipsel, E-Mail, Schutz, Shortcode, Spam » ocean90s weblog
Pingback: 5 Great CSS Techniques To Improve Your Website | CSS Heaven
Pingback: email verschlüsseln --> ascii in unicode, frage zum script... - Seite 2 - php.de
Pingback: 50 New CSS Techniques For Your Next Web Design | Theme Center
Pingback: 9 formas de ofuscar emails a prueba : Blogografia
Pingback: Computer 101 on KLAKE 97.7 » And there was much rejoicing…..
Pingback: Las 3 formas más seguras de publicar emails en la web | Omeyas Web
Pingback: 50 New CSS Techniques For Your Next Web Design « SUMERA’S Weblog
Pingback: Email obfuscation « Rootix Blog
Pingback: E-Mail Links schützen | bo! hu? co.
Pingback: Email Obfuscation, the Accessible Way | Zing-Ming
Pingback: michael pollak » email verschleiern.
Pingback: Simple measures to choke spambots | Fascination Beach
Pingback: Técnicas para Ofuscar Email | unijimpe
Pingback: Email Obfuscation (with mailto:) to Avoid Spammers
Pingback: Email spam a css method — Stofke on wheels