Having trouble finding good, relevant emails in your inbox?! Have you lost a couple of contracts just because you did not reply on time to your partners? This article should guide you through finding the best way to fight against spam on your website.
A while ago, well, actually a couple of years ago all mail links posted on websites looked like myemail@myemail.com. Soon after that, bots started to gather those emails and people started to receive spam on their emails. The first protection for spam was developed. People were starting to post their mail like myemail at myemail dot com (sometimes 'at' and 'dot' were written in their mother tongue). But this way to protect personal emails soon became useless.
Different blacklists were developed, but sometimes these blacklists proved to be useless too, as they were not always up to date. So the tough part starts here. How do we actually protect ourselves from spam bots?
Some websites use CAPTCHAs. That image block with letters, numbers, somewhat distorted. But you all know that there are few times when you cannot read what they say. So if you cannot read them yourself, what about people with disabilities? I use seochat's tools almost every day and sometimes I get CAPTCHAs that should contain 5 symbols with a few blank spaces, so I must hit refresh. Aauugh.
Another way to protect your email would be by using javascript. There are a few examples to use javascript to create email links that bots will not be able to read. Some are just like the ones bellow:
| <script language=JavaScript> <!-- document.write("support" + "@" + "example.com"); //--> </script> <script language=JavaScript> <!-- var user = "support"; var host = "example.com"; var link = user + "@" + host; document.write("<a href=" + "mail" + "to:" + user + "@" + host + ">" + link + "</a>"); //--> </script> |
Another way to use javascript would be a little more complex. You can see such ways to hide large amount of information at Web International Awards (look at the Full Story button). You can use such scripts to hide your email from bots, or contact forms. To create the effect used at Web International Awards you will need an onclick action inside the IMG tag, as explained bellow:
The onclick action
| onclick = "swapdisplay('a8');" |
To produce the effect you need, you must have 2 DIVs in your page. One with ID="a8a" which will be the default one, and another div with ID="a8b" which will be the div containing your email address.
The javascript
| function swapdisplay(tag) { var tagA = tag + "a" var tagB = tag + "b" if (document.getElementById) { var state = document.getElementById(tagA).style.display; } else if (document.all) { var state = document.all[tagA].style.display; } var newStateA = ""; var newStateB = ""; if ( state == "block") { newStateA = "none"; newStateB = "block"; } else { newStateA = "block"; newStateB = "none"; } if (document.getElementById) { document.getElementById(tagA).style.display = newStateA; document.getElementById(tagB).style.display = newStateB; } else if (document.all) { document.all[tagA].style.display = newStateA; document.all[tagB].style.display = newStateB; } } |
But what if some bots could get passed this? The DIV containing the visible data is supposed to be like style = "display:block" and the one with the contact forms or emails should be style = "display:none" , and some bots could read it.
What next? You could try to encode your email! What? Let me explain what I mean. In a regular <a href="mailto:myemail@myemail.com">myemail@myemail.com</a> link the bot can easily read you email address. What if the link above is like explained bellow:
| <a href=" myemail@myemail.com" target="_self"> myemail@myemail.com</a> |
This should work wouldn't it? Yes it should. And it will probably will.
The last, and the best way I say, would be placing a form on your contact page, where users need to input their email. They receive a link to a contact page that uses a confirmation code sent from the URL in the email they just got. The same idea of username activation. That code will be used once, and the visitor will see on the page they are taken to from their email full forms to contact you, and email addresses.
It is up to you which one of the above you use. Personally, as soon as I have enough time I will update all of my websites using the last method, among with encoded emails in html. That will definitely get rid of my headaches.
Conclusion
It doesn't matter how much you try to protect against spam because bots evolve and find ways to get your email. So that is why you must always update your websites in order to fight spam. If you have a break, you will get spammed.
So, is it really the time to say goodbye to spam? No. It will never be. The internet and technologies are always changing and you must keep up with them. Finish your coffee and start coding!
Related Articles
- Avoiding SpamUnless youve found a way of living without the internet, youve undoubtedly had an experience with spam. There are few things as irritating as junk mail clogging up your inbox. So how can one best go about preventing spam?
- TEN Tips For Your Web Site Home PageLoading time: try to be below 20kb less number of images specify height and width of images Html with out erros WYSIWYG editors load up your html code. so try using text editor part of your html editors instead of visual editor Images Only home page: Say goodbye to images o...
- Stop SpamPreventing your e-mail that you placed on your site from being found by spammers is very hard. Some have even taken their e-mail addresses off their sites and replaced them with contact forms to prevent this. Here is a neat .htaccess method to help put a stop to this. This will stop many of the bo....
- EtiquetteOkay, these discussion list people are a weird group. For some reason, they dont like to wade through piles of sales pitches for unrelated (or even related) products or websites. They call this spam. And they can get very upset with people that send spam. It giv...
- Domain Names - Free Privacy - How to Protect your Privacy When You Register a Domain NameAre you worried about your privacy online when starting a website? You should be. When you register domain names - free privacy settings from your registrar can protect you from spam, prying eyes, or worse.
- Turning Features Into the Meat and Potatoes of Successful AdvertisingLearn to present features of your site as benefits to your users. This simple technique will tremendously boost the effect of your advertisement.
- Out Of Exile: How To Get Un-banned From GoogleIf youre banned from Google, dont cry Help! Instead, learn how to get back on. Youll find a list of possible reasons and ways out in this article.
- Is Yahoo Under the Influence of TrustRank?This is a very interesting article about SEO and the Search engine algorithms. The author attempts to explain the intricacies of ranking in a search done by the big 3 Search Engines - Google, Yahoo, and MSN. The author then explains ....
- Warning! Your Website Domain Can Be TakenThere are some basic measures I did not know about until recently and had to make some changes. Some call this domain hijacking and can be a mess to try to get it back. A domain can be taken if it is not locked.
- See the Destruction of Email Messaging from the Comfort of Your Home!!!Spam and other commercial messages are throttling emails simple appeal. And no-one is offering a credible remedy.
