- 21
- Jul
Silvan 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:
- Changing the code direction with CSS:
- Using CSS display:none:
- ROT13 Encryption (using rot13 or str_rot13):
HTML
-
<script type="text/javascript">
-
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);}));
-
</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.
Related Posts
Tags: Email, Obfuscate, Security, Spam, Web development



July 21st, 2008 at 7:35 pm
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.
July 22nd, 2008 at 9:24 am
[...] Best ways to obfuscate email address [...]
July 23rd, 2008 at 3:02 am
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 = foo@bar.tld
July 23rd, 2008 at 6:53 pm
[...] Three Best Ways To Obfuscate Email Addresses [...]
August 29th, 2008 at 6:40 am
Yeah, the email address should be entered back to front in the first example.