Protect email from spambots

Are you protecting your email addresses? Here’s how you can protect email from spambots.

Spammers get your email address by using evil automatic software that scours your website. When they find something like “mailto:joe@YourDomain.com“, they put you on their spam lists. These software are known as “spambots”.

Techniques for avoiding the spambots have been around for years, but it’s surprising how many webmasters aren’t using them.

To protect your email addresses, here’s a simple bit of code that robots won’t be able to harvest, at least with their current techniques:
<script language=javascript>
<!–
var linktext = “THIS APPEARS ON THE PAGE”
var email = “sarah”
//replace sarah with your email username
var emailHost = “YourDomain.com”
//replace YourDomain.com with your domain name
document.write(“<a href=” + “mail” + “to:” + email + “@” + emailHost+ “>” + linktext + “</a>” )
//–>
</script>

If you want to show your email address, use this instead (do not use the above codeĀ and replace the linktext with your email address):
<script language=javascript>
<!–
var email = “sarah”
//replace sarah with your email username
var emailHost = “YourDomain.com”
//replace YourDomain.com with your domain name
document.write(“<a href=” + “mail” + “to:” + email + “@” + emailHost + “>” + emailĀ  + “@” + emailHost+ “</a>” )
//–>
</script>

Put this code on your pages, making sure to replace all instances of your old “mailto” HTML code.

Some other ways to protect your email:

  • Image to display your email
  • Use online form submission

If you have further questions, please do not hesitate to contact our support team.

Protect email from spambots

(Visited 120 times, 1 visits today)