BeanSoftware Logo
 

 
ASP.NET Database Search Control
 
 
     



How webmasters can fight against Spam?


We know that the spambots and spiders harvest email from the web pages of your site and these emails that are harvested are used to send junk emails from many companies. There are many ways to prevent this to happen. Webmaster can make use of these methods to avoid harvesting of emails by these spambots and spiders.

How to hide e-mail address from the spambots and spiders?

One way to hide your email addresses is to write them in a non-email format so that only human readers can read it, whereas the spambots and spiders may not read them. Suppose you have an email id like yourid@yourdomain.com, then you can write that email address as "yourid at yourdomain dot com". The user can read this and spambots are fooled in harvesting that email address. One of the drawbacks of this format is that still there are users who may not be aware that it is an email. Most of the users still like to click a link that open their email client or fill out a form to send emails. If the spambots is intelligent it can also read this type of formats. Still this works out for most of the spambots.

Using alias for email addresses

You can use alias in the recipient field if you are using form mailer script to send emails. By using alias in the recipient field you can prevent the email address from being visible to the users and spambots.

Adding some more text to email addresses

An email address like yourid@yourdomain.com can be written as yourid@antispam_yourdomain.com. In this format the user has to neglect the characters "antispam_" so that he can get a valid email address to send emails. In this method the user should be informed of how to use the email address. A short description should be given to the use on how to use the email address given in the web page. We cannot ensure that each and every user will read the information and use the email address in a proper format. This method also disallows the spambots from harvesting the emails from your website. We cannot expect all the users to be experienced in finding out this information. Most of them would like to just click the link to an email address and send an email. For such user this method will not be user-friendly.

Encoding mailto link with JavaScript

Another way to prevent spambots from harvesting emails by finding the mailto link is to use JavaScript for encoding the mailto link. A sample JavaScript is given below, which can be used to encode the mailto link.

<SCRIPT type="text/javascript" language="javascript">
<!-- Begin
id ="yourid";
domain ="yourdomain.com";
document.write('<a href=\"mailto:'+id+'@'+domain+'\">');
document.write(id+'@'+domain+'</a>');
// End -->
</SCRIPT>

By using the above code you can avoid spambots by harvesting emails. One of the disadvantages of this type of encoding through JavaScript is that some of the users might turn off JavaScript in their browser. The given code above is only one format of JavaScript. There are many types of JavaScript to encode the mailto link. If you are not an expert in writing code to encode in JavaScript, then there are user-friendly forms available in lots of websites that can be used to generate the script for you. Try using these forms and generate the script needed for your requirements.

URL encode your email address

URL encoding the email address is one another way to prevent spambots from harvesting your email addresses. For example you can use the string "%2E" for ".", in URL encoding. The equivalent for '@' is "%40" in URL encoding. Now-a-days spambots are getting more intelligent to even interpret this type of encoding. This can prevent you in preventing certain types of spambots.

Using character entity encoding

Character entity encoding is a way to encode the entire email address or parts of the email address so that the spambots do not recognize that is there in the <a> tag of the html. For example you can encode the email address yourid@yourdomain.com in to something like:

<a href="&#0109;&#97;&#105;&#108;&#116;&#111;&#58;&#121;o&#0117;&#0114;
&#0105;&#0100;&#64;&#121;&#0111;&#0117;&#114;&#0100;&#111;&#0109;
&#097;&#0105;&#110;&#46;&#099;&#111;&#109;">&#121;o&#0117;&#0114;
&#0105;&#0100;&#64;&#121;&#0111;&#0117;&#114;&#100;&#111;&#0109;
&#097;&#105;&#0110;&#046;&#99;&#0111;&#0109; </a>

using character encoding. In this method each and every character in the email address is encoded so that spambots cannot find the email address. When displayed in the web page the above encoding is interpreted as <a href=”mailto:yourid@yourdomain.com”></a> by the browser. But the spambots would not recognize that. You need not be an expert to encode your email address in this form. You can use tools like Email encoder available at http://www.proles.net/emailencoder/.

Use contact form instead of mailto link

Instead of the mailto link in your web page you can use forms to send emails. You can create a simple form in the web page so that the user uses that form to submit any details to your email address. CGI scripts are used to process the information submitted in the forms. Mailer scripts are available in plenty for free in the Internet. You have to be careful to choose a mailer script because there may be bugs in them. Choose a reliable mailer script to process form information and send you emails. By using contact forms your email addresses are hidden from the spambots and the users themselves.

Using e-mail redirection

Email redirection is another method used to prevent Spam in your inbox. Websites like cjb.net provide your many emails, which can be used for free. You can redirect your emails from these emails addresses to your main email addresses. By this way you an give your cjb.net email addresses to all and hide your main email address from the spambots and other users.

Using robots.txt file

Robots.txt file can be used in your website to prevent bots from reading some of the web pages in your websites in which you have contact information. We cannot expect all bots to follow the rules in the robots.txt file. Hence traps are set up to misguide the spambots that do not follow the rules in the robots.txt file. The disallow phrase in the robots.txt file is used to prevent the bot from entering certain directories in your domain. If you find that a bot violates the rules in robots.txt file then you can ban that bot from reading your domain again. There are programs like Robotcops that can be used for that purpose.

 

Copyright © 2002 - 2007 Bean Software. All rights reserved.