Here's a quick little jQuery script I created just now. Don't give your email address to spam bots! Instead, try this.


view plain print about
1<a href="/contact"><span class="no-script">Contact Us</span><span class="obfuscate">com/mydomain//me</span></a>
(Use your email address in the format above, where your original address is


view plain print about
2 display: none;

Javascript (jQuery):

view plain print about
1// email obfuscator
2var $obfuscate = function(el){
3    var obStr = $(el).text();
4    var prefix = obStr.split("//")[1];
5    var suffix = obStr.split("//")[0];
6    var domain = suffix.split("/")[1];
7    var ext = suffix.split("/")[0];
8    var returnStr = prefix + '@' + domain + '.' + ext;
9    // console.log(returnStr);
10    $(el).text(returnStr).show(100);
15    $(this).siblings('.no-script').hide();
16    $obfuscate(this);

This example uses a link to the /contact/ page of a website, and does not open an email address. If you wanted to use a mailto link you could adapt the script slightly to also handle the 'href' value of the link's parent like so:

view plain print about
1$(el).text(returnStr).show(100).parents('a').attr('href','mailto:' + returnStr);

I don't think bots will grab com/domain//me and add it to a junk mail list, but they'll certainly harvest an email in plain text, or in the href of a "mailto" link. The idea is that, since the bots don't view the text rendered via javascript, they don't see the actual address, just the obfuscated version, when crawling through the source code.