Front Office Car Lot Trailer Park Grease Pit Tool Box

How To Hide Your E-mail Address On Your Web Site From Spambots

It's a crying shame that in the information age, the slime at the bottom of the gene pool is spending too much time trying to fill our e-mail boxes up with unwanted e-mail messages we call SPAM. The more we try to filter, stop, block or remove, the more ways they find to get into our mailbox and under our skin. I guess if there weren't some fools out there actually responding to it, they would stop on their own.

One way these scum gather e-mail address is by the use of something called a spambot. A spambot is basically a program that goes out and reads web sites and gathers e-mail addresses from them. They will look at any web page no matter how small or insignificant. If your address can be found, they will find it and start sending you junk. This is really annoying when you build your own web site and you want people to be able to contact you about it but not to be inundated with junk.

Enough with the rant, here are my suggestions on how to stop spambots from getting your e-mail from your web site. These will make it very difficult if not impossible for the spambots to find your address on your page.

Method 1: Converting Your E-Mail Address to Unicode - This method basically converts your e-mail address into codes that web browsers can convert back into normal looking text for display and to make your e-mail link work. Use converter below.

This text:
Would be coded like this:
Of course most sophisticated spambots already know how to read this out of your page source code and still get your e-mail address. So this is not the most desirable method any longer.

Method 2: Inserting Your E-mail Address With Javascript - This method uses the Unicode version of your e-mail list but the code is kept in a separate file and is not inserted until your page is loaded in the browser. This way, a spambot cannot read your source code to find your address. It would only see the call for the script. This is the method I use for my web sites.

Step 1: create a file called mail.js and copy the following text and paste it into that file. There are two spots where you need to add your own data as noted in the text. The first spot is for the actual e-mail address you want to use in Unicode format (use converter below). The second spot is for the link text that the user would click on. This would either be the e-mail address or something else like "Send me and e-mail.". If it is an e-mail address, use the Unicode version. You can not use single quotes in either spot. Save the file to the same place your web page is or to some other location.

document.write('<a href="');
//Insert Unicode version of e-mail address between the single quotes below.
//Insert Unicode version of link display text between the single quotes below.
Step 2: Copy the following text and insert it into your web page where you want the e-mail link to appear. Make sure the name or the script is the same as what you saved it as including the path if it is in a different place than the page you are working with. This is what will call your script to insert the e-mail link into your page.
<script language="JavaScript" src="mail.js"></script>
Step 3: Upload your web page and make sure that e-mail link is working as desired.

Note: You can create multiple script files for different e-mail addresses or if you want different link text to be displayed in certain areas. Just be sure to give each script file a different name and update the link as necessary. You can also include style sheet information into the script as needed.

Below are two tools that allow you to quickly Unicode any text. The first one will create e-mail links that you can put into your site quickly. The second lets you convert just an e-mail address, or anything else.

To create a link, enter your e-mail address in the first box. Put the text you'd like to be displayed as the link in the second box if you want something different than your e-mail address, otherwise leave it blank. Hit the "Convert" button. The code will be displayed in the box. Hit the "Copy" button and then you can paste the code into your page.

E-Mail Address:
Link Text *:
Displays On Web Page:

* Leave Link Text box blank to use e-mail address.

Text to Convert:
Displays On Web Page:

    Click here for new script creator.

[Front Office] [Car Lot] [Trailer Park] [Grease Pit] [Tool Box]

Copyright © ,, all rights reserved.