Hackosis is an Open Blog. You Can Participate.

  • 21
  • Jul

AntiSpamSilvan over at techblog.tilllate.com has done some research results for us on the best ways of obfuscating email addresses on a web page.

The method used involved nine different code snippits and came up with three over a period of one and a half years that received zero spam.

The Three Methods:

  1. Changing the code direction with CSS:
    1. <style type="text/css"> 
    2. span.codedirection { unicode-bidi:bidi-override; direction: rtl; } 
    3. </style> 
    4. <p><span class="codedirection">email@domain.com</span></p>
  2.  

  3. Using CSS display:none:
    1. <style type="text/css"> 
    2. p span.displaynone { display:none; } 
    3. </style> 
    4. <p>email@<span class="displaynone">null</span>domain.com</p>
  4.  

  5. ROT13 Encryption (using rot13 or str_rot13):
    1. <script type="text/javascript"> 
    2. document.write("<n uers=\"znvygb:fvyinasbbone10@gvyyyngr.pbz\" ery=\"absbyybj\">".replace(/[a-zA-Z]/g, function(c){return String.fromCharCode((c<="Z"?90:122)>=(cc=c.charCodeAt(0)+13)?c:c-26);})); 
    3. </script>silvanfoobar’s Mail</a>

See more about this at techblog.tilllate.com. I noticed he didn’t other methods that I’ve seen such as breaking out the email address in a non-visible table, etc.

Have any other tips to obfuscate email addresses? Let us know in the comments.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Related Posts


Tags: , , , ,

Like this post? Subscibe to the RSS feed.


5 Comments

  1. Oapah Says:

    I’m not sure the first one would work too well. Crawlers don’t process CSS, they’ll just so a regex on the pure HTML and find the email address straight away.

  2. Daily Find #91 | TechToolBlog Says:

    [...] Best ways to obfuscate email address [...]

  3. meathive Says:

    The bots are _slowly_ evolving; a small portion seem to detect the “foo at dot tld” method which I discovered after using that convention on a couple of papers online. Sites often just encode the “@” which may work just dandy but I personally prefer encoding the entire e-mail string with a custom function that outputs those funky HTML char codes.

    foo@bar.tld = &#102&#111&#111&#64&#98&#97&#114&#46&#116&#108&#100

  4. Interesting Finds: 2008.07.24 - gOODiDEA.NET Says:

    [...] Three Best Ways To Obfuscate Email Addresses [...]

  5. Richard Says:

    Yeah, the email address should be entered back to front in the first example.

Leave a Comment