Plamen Todorov's blog

How to hide your e-mail from spambots…

Every webmaster knows that it’s not a good thing to post your e-mail on your website, at least not posting it plaintext. There are many spambots which index random websites for e-mails posted in them which they use to send spam letters to. If you need to post your e-mail on your website and you don’t like recieving 300 spam mails a day you must “hide” your e-mail from the spambots but make it accessible for users you must make it as a .jpg, .gif, .png image or…


1. You can fool the spambots by writing your e-mail like that:

     foo<!-- >@. -->@<!-- >@. -->bar<!-- >@. -->.<!-- >@. -->com


Which, outputs foo@bar.com to users browser.


2. You can fool the spambots by using a simple javascript. Just put it
where you need your e-mail to be settled.

   <script language="javascript"><!--
var e = "foo", h = "bar.com"
document.write
("<a href=" + "mail" + "to:" + e + "@" + h+ ">" + e + "@" + h +
"</a>")
//--></script>


Which outputs <a href=”mailto:foo@bar.com”>foo@bar.com</a> to the
user’s browser.

There are many other ways to do this, but I think that 2 methods are suitable for any webmaster.


To Tumblr, Love PixelUnion