Hiding Emails From Spammers

Call: 901-568-2255

How to hide your email address from spammers, and their automated email harvesting robots.

Boy do I hate receiving unsolicited emails.   That is a exacerbated by Spammers, mass-mailers, etc.  who employ these little programs, called email harvesting robots or bots.   Their only job is to surf from page to page on the internet looking for email addresses to collect and save.    These email address's are everywhere on the internet and especially on commercial websites, like this one, where the company wants to give legitimate customers and/or prospects an avenue to contact them.    The bots look for the tell tale signs of an email address in the form of 'xxxxxx@yyyyyyy.zzz'  (Let them find that one!), where the xxxxxx is the user name, followed by the '@' symbol, then the company name (yyyyyyy) and ending in a TLD (Top Level Domain) like '.com', '.net' or '.org'.   This format is can be found in the plain text that you can read and/or in the HTML code that the bot can easily read.

One way to thwart these bots, is to change the format to effectively hide the email from those bots by using JavaScript and/or other techniques.

How To Use the JavaScript Method

The following are examples of JavaScript that you can use to make your email appear different in the code but still perform the same function as if it regularly coded in HTML. To use these examples, just copy and paste the code into your HTML document and then replace the field with your email address.

1. Basic Email using JavaScript

<script language=JavaScript>
<!--
document.write("emailhere" + "@" + "commercefriends.com");
//-->
</script>

Result: 

2. Basic Mailto: Email  using Java Script with Link Text

<script language=javascript>
<!--
var username = "emailhere";
var hostname = "commercefriends.com";
var linktext = username + "@" + hostname;
document.write("<a href=" + "mail" + "to:" + username +
"@" + hostname + ">" + linktext + "</a>");
//-->
</script>

Result: 

3. Inline JavaScript

<a href="#" onclick="javascript:window.location='mailto:'+'emailhere'+'@'+'commercefriends'+'.com'">
Email Us
</a>

Result: Email Us

With the above three javascripts options above, should give you some flexibility in how you use these scripts on your website. Remember to insert your own email address into the fields about where the regular emailhere@commercefriends.com email address is located.


4. Encoding 

For an extra measure of email security, you could change the code to use an encoding method.   This has been a very effective measure against those email harvesting bots.  

Code Before:

<a href="mailto:'xxxxxx@yyyyyyy.com">xxxxxx@yyyyyyy.zzz</a>

Code After:

<a href="mailto:%78%78%78%78%78%78%40%79%79%
79%79%79%79%79%2E%7A%7A%7A">
Email Me</a>

This involves changing, or encoding, each character.  It will still work like a normal mailto: link to the user, but the code will not be in the standard format for the bots to collect.

Below is a quick tool to do this for you.   Simply enter your email address into the box below and click the button to it's right to view your email address in its encoded form.    Cut and paste the code into your page.

Enter email address:
Cut and paste the resultant mailto: tag code into your HTML document.
Change "Email Me" to whatever you want it to be. Except don't use your real address or any real address or domain. We don't want to have the spammers to pick up the address in plain ole text.

The encoding technique will hide your email from all but the most sophisticated email harvesting robots. 

 


5.  Encoding and  JavaScript

A more effective technique would be to use JavaScript to output the code when the page is rendered by the browser.  The JavaScript code below produces a button that you click on to send an email.

<SCRIPT LANGUAGE="javascript" TYPE="text/javascript">
<!-- 
var sendto = "commercefriends.com"
var mailid = "mail" + "to:" + "youremail@" + sendto
document.write("<FORM>");
document.write("<INPUT TYPE=\"submit\" VALUE=\"Send email\" ");
document.write("onClick=\"parent.location=mailid\"> ");
document.write("</FORM>");
// -->
</SCRIPT>

You could even save this code in a JavaScript file and use a SSI include to put it on your website.   

Given all these possible methods, I'm sure you can start to think of many more ways to hide your email address from unscrupulous email harvesting bots.  

Good luck and happy hiding!

 

 

  Internet Marketing Home
  SEO TIPS & TECHNIQUES
  SEARCH ENGINES 
 
  SEO Articles
  GENERAL INFORMATION


© Copyright 2001-2005 by CommerceFriends.com, Memphis, Tennessee.  All Rights Reserved.
Site maintained by VIMATA Interactive Corp Memphis, TN -

Search Engine Optimization Services & Internet Marketing - CommerceFriends.com

Resources:  Supplies & Equipment for Pools - Animal Figurines & Fine Crystal Figurine - Patio Outdoor Furniture & Market Umbrellas -
Swing Sets Wood Kits
- Storage Buildings & Outdoor Sheds - Gifts Ideas - Home Decor Accessories - Preschool Play Finger Play Games & Videos - Cover Your Book Ideas at Book-a-roo-Covers - Outdoor Backyard & Patio Decor - Antiques & Collectibles