Save Your Site from Spambots

Steven Champeon has written this helpful article for system administrators running Apache as their web server. Apache is about the most common web server in use - and a fine one it is at that. If you happen to be running an ASP-based site, however, it's more likely that you'll be running Microsoft's IIS web server. If this is you, then read on.

Champeon's Apache solution is very tidy - it forces the web server to check for matches of known spambots against the name of the User Agent trying to access the site. If the script detects a known spambot, a different page (free from email addresses) is displayed.

There's no reason IIS users can't put the same logic to use. Below is an ASP function to detect known spambots and to return either your valid email address, or a harmless "Email address witheld" message if a spambot is detected.

Put this function above the opening <html> tag of your page:

Then, each time you want to use your email address in the page, use the following. Remember to replace the quoted email address with your own valid email address.

That's all there is to it. If a regular user hits your site they will see your valid email address. If the visitor is a known spambot, it will be presented with "Email address witheld" and so will not find an address to harvest.

Limitations: I've tested this script as best I can, but as ever it might not be flawless. Please use the address below to contact me if you spot any reasons why this script might not work! :)

For further information please feel free to mail me - my semi encoded email address is : dru@dreamweaverfever.com