Site Stuff

About Me
My Sites
My CD Collection

My Pages
Band MySpace

Creative Force
Avatar Gallery
Signature Gallery


Webmaster Stuff
Free Layouts
Free Scripts



3089 hits

Protecting Against Spambots

Spammers are clever. They have special programs, called "robots" or just "bots", that trawl the Web searching through HTML to find email addresses. They add these addresses to their database, and boom! Spam starts flooding in! Most webmasters will have found, at some time, that they made a mistake in putting their email address up on their site as contact information. But there are ways to do it, and these are some of the easiest ways. Some of these only apply to webmasters, but some go for everyone!

For the purposes of this tutorial, your email address is - just replace the parts with your real address when you use the techniques here.

- Don't link to your email address, ie:
<a href="">
The simplest spam-bots look for the "mailto:" bit and grab the address after it.

- Use Javascript to hide your email address. If you want to link to your email address, Javascript is the easiest way to hide it from spambots.

1. If you want to link "" to, use the following code:

<script language="javascript"> 
var username="yourname" 
var hostname="" 
var linktext=username + "@" + hostname 
document.write("<a href=" + "mail" + "to:" + username + "@" + hostname + ">" + username + "@" + hostname + "</a>") 

2. If you want to link "Click here" or other text to, use the following code:

<script language="javascript"> 
var username="yourname" 
var hostname="" 
var linktext=username + "@" + hostname 
document.write("<a href=" + "mail" + "to:" + username + "@" + hostname + ">" + "Click here" + "</a>") 

- Don't use your main email address (whether ISP-issued or not) for your website, or to sign up to stuff on the Net (since some companies will sell your email address). Set up a new one just for it, so if you get spammed it won't clog up your personal email. You can give your main email address to people who legitimately email you about your site, eg. your staff members. Also, get a program that will bounce spam.

>>JA recommends:
-------Fastmail - gives 10MB space for free plan, lots of host domains to choose from, more space and bandwidth and host your own domain if you pay. Also lets you bounce spam.
-------Gmail - gives over 2000MB space and has the Best. Spam Filter. Ever. and reporting system. Also protects against things like phishing ^^ At the moment it's still in beta so you need an invitation to get an account, so if you need one email me at and I'll send you an invite straight back to your email account.
-------Spymac - gives 1000MB space (yes, you read right) for free, plenty of room for your legit emails even with a lot of spam. Also gives 100MB webspace and 250MB image storage space.
-------Mailwasher - a free program that will bounce spam from almost any type of email address.

- Use aliases. These are "disposable" email addresses that forward email to your real email address. If you start getting spam to an alias, just delete the alias. Also, you can set up a different alias for each thing you sign up to, so you can see who sells your email address (eg:,, If you have your own domain, some hosts let you set up aliases for yourself; otherwise, try one of the free services listed below.

>>JA recommends:
-------dot.TK - when you sign up for, you get 5 aliases of the type - when you sign up for, you get 100 aliases of the type
-------Sneakemail - you can get as an alias

- Use a "formmail" script. These are popular and easy to find; the user fills in a form, and the information in the form is emailed to you through a CGI script, so your email address is never revealed. You can get hosted formmails or install your own. Many hosts have formmail pre-installed for you - just check their support database for details.

>>JA recommends:
-------HotScripts - a huge database of scripts; just find the right category and install your own.
-------HostedScripts - if you can't or don't want to install your own script, and your host doesn't have it preinstalled, this site is one of many that will set up and host a formmail script for you.

Well, I think that's pretty much it for me XD. Give these techniques a go, and hopefully you'll be relatively spam-free - that is, provided you don't go splashing your email address all over the Net!