Pete Freitag Pete Freitag

Another Trick for Avoiding Email Harvesters

Published on March 20, 2005
By Pete Freitag

Most people know that spammers have robots that surf the net looking for email addresses, such programs are called email harvesters. Many people try to use JavaScript to trick these harvesters, but another technique that you can use, is by creating a link that redirects to a mailto:you@address address. You can do this with services like or Here's an example of such a link:

Note that just like the javascript solutions its still possible that the harvesters will get your address, if they try to follow the link, and can detect this technique. The best solution is to just create a form and send the email with your web application server. Not everyone has that luxury however.

email spam

Another Trick for Avoiding Email Harvesters was first published on March 20, 2005.

If you like reading about email, or spam then you might also like:

Discuss / Follow me on Twitter ↯


What I've found working really well is escaping email address using URL-encoding and HTML-escaping.

So [email protected] would become this for use in href attribute (lets see if it shows correctly):


And HTML-escaped for using as link name:

So first is every email character URLescaped (you have to loop over characters and do FormatBaseN(Asc(char),16) in CF for example), and HTMLescaped with ampersand, hash, and character Asc() value.

Browsers display it properly, but my hope is harvesters won't understand it.
by Erki Esken on 03/20/2005 at 3:43:18 PM UTC
by bonnie gardner on 09/11/2005 at 5:46:10 AM UTC
I also use sites like, they provide a quicker and more dsiposable short URL service to hide emails.
by Xombie on 10/22/2005 at 7:19:57 AM UTC