Hiding your address with OnlyMyEMail Encoder

Opinion
Jul 11, 20073 mins

* OnlyMyEmail has a simple but effective way of encoding your e-mail to keep spiders away

Putting your e-mail address anywhere on a Web page is more or less an invitation to be spammed. Any idiot with a Web spider can harvest hundreds of addresses in seconds by simply searching for strings that match the pattern of e-mail addresses.

Sure, you can obfuscate your e-mail address by substituting the string “[at]” for “@” but there are spiders that now handle that and other tricks with ease. What you need is something more robust which just happens to be what I have for you today.

OnlyMyEmail, a company that specializes in antispam technology, has a simple but effective way of encoding your e-mail address in JavaScript such that spiders can’t recognize it yet a user clicking on a link can use the address exactly as if it wasn’t obfuscated.

The OnlyMyEmail Encoder tool, which is part on OnlyMyEmail’s DNS Tools, allows you to specify ‘Email Address’, ‘Link Text’, ‘Subject’, and the ‘CSS Style for Link’.

If you only specify the ‘Email Address’ the resulting JavaScript won’t actually create a link – it will just display the e-mail address such that spiders can’t “harvest” the actual address content. If the ‘Link Text’ field is provided that will be the text or an image if you provide an HTML image tag. You can also provide a ‘Subject’ field which will automatically fill in the subject on the user’s e-mail client and the ‘CSS Style for Link’ field can provide the style specification for the link.

The result is a chunk of JavaScript that you can incorporate into your Web page wherever you would have used an e-mail address. For example, for feedback@gibbs.com with the link text “Drop me a note” and the subject “Reader feedback” the service generates the following script:

var foo=”var a=’Str’,b=’rom’,c=’C’,d=’har’,e=’ode'”+

“,f=’.f’,g='(‘,h=’)’,i=’ing’;var q=0,r=1,s=2,t=3,u=4″+

“,v=5,w=6,x=7,y=8,z=9;var bar=”;var foo=”/a”+eval(a+i+f”+

“+b+c+d+c+e+g+w+s+h)+”te”+eval(a+i+f+b+c+d+c+e+g+w+q+h)+””+

“;nobspa&nsp;&nb;mebspp&nDrok”+eval(a+i+f+b+c+d+c+e+g+t+u+h”+

“)+””+eval(a+i+f+b+c+d+c+e+g+w+s+h)+”baceedp;fnbser&eadt=”+

“Rjecsubom?s.cibbk”+eval(a+i+f+b+c+d+c+e+g+w+u+h)+”gbaceed”+

“: fltomaif=”+eval(a+i+f+b+c+d+c+e+g+t+u+h)+”hre”+eval(a+”+

“i+f+b+c+d+c+e+g+w+q+h)+”a “;for(i=0;i

“r+=foo.charAt(i+2)+foo.charAt(i+1)+foo.charAt(i);}bar=bar.s”+

“plit(”).reverse().join(”);document.write(bar);”;

eval(foo);

I don’t think that there’s any spider that could figure out that this code is actually an e-mail address. This is a very clever and really simple technique to use. A big “Thank you” to the guys at OnlyMyEmail! The rest of OnlyMyEmail’s DNS Tools are also worth checking out and come in very useful when your usual tools aren’t handy.