Mailto Hyperlinks Stop Spam Bots!

Everyone hates spam, I hate it even more than most people. If you put an email address on a website, as a mailto hyperlink, then it's likely that spam bots will find this address and start sending annoying emails.

One way to get around this is to use a clever technique which I discovered over at SpamSpan.com. Instead of entering your email like a normal hyperlink use the code below:

HTML:
  1. <span class="spamspan">
  2. <span class="u">pete.graham</span> [at] <span class="d">domain-name.com</span>
  3. (<span class="t">Pete's Email Address</span>)
  4. </span>

A nifty piece of Javascript is then used to convert this html into a normal mailto hyperlink. Spam bots don't have Javascript enabled so wont register the link. If a visitor to your site have Javascript disabled they will see the link in the form below:
petegraham [at] domain-name.com (Pete's Email Address)

Email Spam Bot

# Pete Graham

Post a Comment

Your email is never published nor shared. Required fields are marked *