Re: Hiding E-Mail Address from Web Robots

by "Bob" <webguy(at)re-data.com>

 Date:  Wed, 8 Aug 2001 00:50:35 -0700
 To:  "Jarkko K. Laukkanen" <Jarkko.Laukkanen(at)Helsinki.Fi>,
<hwg-techniques(at)mail.hwg.org>
 References:  Helsinki
  todo: View Thread, Original


>From the rapid keyboard work of Jarkko,


<<<<<<<<<<<I remember seeing a javascript that 'hides' the e-mail address
from web
 robots. The script outputs the address correctly to the screen or to an
 e-mail program, but for a robot looking for a direct text string resembling
 an e-mail address it fails.>>>>>>>>>>>>>>


Just happened to get this in my email yesterday.

This is a very good resource

bob
www.re-data.com

Encoding email addresses with the ISO-Latin-1 codeset (see
"Advanced Email Link Generator with Anti-Spam Encoder"
linked from http://willmaster.com/possibilities/archives/
for more info) can deter some email address harvesting
robots. As more people use this technique, though, I expect
the robots to become smart enough to see through such
encoding and copy the address anyway.

Here is a JavaScript solution to removing email addresses
from your web page and keep the "mailto:" functionality.
It is for those who don't use the free Master Feedback form
program from http://willmaster.com/master/feedback/ or who
don't have CGI.

This JavaScript solution should be harvesting robot proof
for quite some time to come.

First, put the following 9-line JavaScript in the HEAD area
of your web page:

<script type="text/javascript" language="JavaScript">
<!-- Copyright 2001 William Bontrager -- WillMaster.com
// Used with permission.
function ToMailer(a) {
RE = /^(.+)\*(.+)$/;
var launch = a.replace(RE,"mailto:$1@$2");
window.location = launch;
} //-->
</script>


Now find any links similar to:

<a href="mailto:name(at)domain.com">name(at)domain.com</a>


and replace them with:

<a href="javascript:ToMailer('name*domain.com')">
<img src="myaddy.jpg">
</a>


Replace name*domain.com with your email address, except
use the "*" character instead of the "@" character. When
someone clicks on your link, the JavaScript function will
replace the * with @ and then cause the browser to act as
if someone had clicked on a mailto: link.

The <img src="myaddy.jpg"> can be a graphic, which can even
have your email address on it as part of the image. Or, you
can use a text link instead, so long as the text does not
contain an email address.

When you get done, there should be no intact email addresses
anywhere in your source code.

Spammer's email harvesting robots will now have to pack
their bags and go to another site for easier pickings.

Will Bontrager

----- Original Message -----
From: "Jarkko K. Laukkanen" <jklaukka(at)pcu.helsinki.fi>
To: <hwg-techniques(at)mail.hwg.org>
Sent: Tuesday, August 07, 2001 11:47 PM
Subject: Hiding E-Mail Address from Web Robots

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA