Hiding Your E-mail Address From Spambots

When I first began publishing websites in the mid-1990s, I would use mailto:links to post my e-mail address. What I didn’t realize at the time, was that this practice was inundating my e-mail inbox with spam.

Spam has been the scourge of the internet since Gary Thuerk invented it in 1978. But since that time, the methods of disseminating unsolicited e-mails and collecting addresses to send them to, have become more and more sophisticated. The invention of spambots, programs that scour the web for e-mail addresses, made e-mail harvesting quite easy.

Many people still use standard mailto:links to allow website visitors to contact them, and depend on spam filters from their e-mail providers to siphon off the spam. The problem with this is twofold. First, the filters are never able to catch all of the spam, which leaves lots of e-mail that serves no purpose other than exercising the recipients fingers (and patience) as he/she deletes the unwanted e-mails scattered throughout their real e-mail messages. The other problem, is that sometimes spam filters will erroneously flag messages as spam when they are not.

It is far more desirable to hide messages from e-mail harvesters, than to try and filter out spam messages. There are several ways to do this, and each individual has to decide which method is right for them.

One common method of avoiding spam is to not use the commercial “@” symbol and not use mailto links at all. Have you ever seen an e-mail address listed as webmaster – at – domain.com? This method inconveniences users by making them open their e-mail client and type in the recipients address, but at least the webmaster can be contacted, and his/her addy will not be harvested.

A better way involves using a graphic image to represent the e-mail address. Creating a gif or png file that shows the address prevents programs that have learned to decipher munged addresses, but has the same disadvantage as the previous method, in that users are inconvenienced and may not want to contact you. Considering that most sites are developed and improved, largely based on user feedback, inconvenience could be a serious issue.

The best way for a website to allow contact with people, but remain invisible to spambots, is to insert a piece of Javascript or PhP that will create your mailto link dynamically! This way, the spambots will not see a link, because the link doesn’t exist (as an actual link) until it is hovered over.

Here is a good script that I found.

<p>Send mail to <script language="JavaScript" type="text/javascript">
<!--
document.write('<a href="mailto:' + 'name' + '@' + 'domain.com' + '">');
document.write('name' + '@' + 'domain.com' + '</a>');
//-->
</script> with questions or comments about this web site.<br /></p>

Of course you will have to change name to your name, and domain.com to your domain. Enjoy this script, and enjoy the privilege of a spamless inbox!

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • BlinkList
  • Fark
  • MisterWong
  • Netvouz
  • NewsVine
  • Propeller
  • Reddit
  • StumbleUpon
  • Technorati
  • Twitter
This entry was posted on Monday, October 6th, 2008 at 3:42 pm and is filed under Blogging, Technology, Web Development. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a reply

Name (*)
Mail (will not be published) (*)
URI
Comment
CommentLuv Enabled