DotNetNuke, ASP.NET, Web Development Blog

Protect Email Addresses from Spambots

One thing I think it's important to do is to protect my clients from spam. Clients like to be able to put their email address on their sites. But, putting an unprotected email address on a site can soon result in a lot of spam as spambots search sites looking for email addresses to add to their lists, often referred to as "harvesting". There are multiple ways to prevent this...

Option 1.) Use a form on the Contact Us page and then include links to the Contact Us page wherever you want. We generally use DNN's Feedback module for this approach.

Option 2.) Use an HTTP Module to obfuscate email addresses. This method is nice because the site administrators or editor can plop down email addresses whereever they like, users can click on the links and it will pop up their mail client like usual, but spam bots would really have to work hard to find the email addresses, and most spam bots would prefer to just crawl other sites where email addresses are exposed. This method is easy to implement, and requires only that you put a DLL in your bin directory and a line in your web.config. Here's a good implementation I found that includes instructtions and the original source: dotnet2themax article.


Leave a Comment
Email: (not displayed)

Enter the code shown above:

Return to previous page