E-mail addresses in your blog or webpage are no secret to spam robots. Here's a guide that should help you protect your email addresses from these spam spiders. Techniques mentioned use text manipulation, Masking, HTML, Flash, CSS, Javascript, etc to hide email.
Email harvesters are the most unwanted visitors on any website. These email spambots crawl the web via search engines to find and extract email addresses from webpages. Chat rooms are virtual magnets for email harvesting software. Email harvesters also scan public areas of the web like internet newsgroups, listserv and forums, blog comments area, "Contact Us" webpages, mailing list archives and guest books. To fool email spammers, let's see how spambots search for email addresses embedded in web pages.
See updated guide: How to Hide Email Address on Websites
How email spammers operate?
Email addresses always contain an @ symbol. Most spambots do a pattern-search for likely combinations of letters (abc@xyz.com) like billgates@microsoft.com or larrypage@google.org in the HTML source of webpages. Often they just search for the @ character and grab all the letters on each side on the assumption that it's a valid email address.
How to keep your email address available to humans but invisible to email spiders?
There are tons of Email Address Protector software that claim to protect your email address in web pages and get rid of junk mail - Don't waste your money, they only encode your email or generate a javascript snippet. We will discuss manual email encoding techniques here. If a visitor clicks an encryped email link on your website, it will work as normal, but spam robots will not be able to extract the address from the link.
Replace the AT (@) and DOT (.) symbols:
The most common approach to block email harvesting is to remove the @ symbol. If you eliminate the @ from email addresses then most spambots won't be able to recognize that the text is actually an email addresses: Here are some examples:
a.p.agarwaal AT gmail DOT com
a.p.agarwaal (at) gmail.com
a.p.agarwaal@gmail.com
a.p.agarwaal_AT_gmail_DOT_com
Mask your email with tags, append meaningful words:
Consider "masking" your email address. Masking involves putting a word or phrase in your email address so that it will trick a harvesting computer program, but not a person. Some email masking examples commonly employed by newsgroups and mailing list subscribers:
a.p.agarwaal@gmail.com.nospam
a.p.agarwaal@gmail.com.removeme
a.p.agarwaal@REMOVE.gmail.com
Also known as email address munging - changing your real e-mail address in a way that will make it unavailable for harvesting.
Replace text with an image:
This technique involves creating a graphic or screen capture of your email address text in jpg, png or gif formats and display that picture instead of the actual address string. Robots and spiders can't read the text that is embedded in the image. Anyone who wants to email you will have to manually type in your address though.
Email Obfuscators
E-mail Obfuscator make you email less vulnerable to spammers. Using an online email Obfuscator, convert (or disguise) individual characters of your email address into corresponding ASCII code (a <=> a hex coding) For example, the email address a@b.com is represented in ASCII as:
a@b.com
The above ASCII string can be used as argument for mailto: protocol as shown here. Email addresses will appear perfectly normal, and will even be clickable, to human visitors to your website.
<a href="mailto:ASCII_STRING">e-mail to confuse sniffer ASCII_STRING </a>
Encode the mailto: and @ symbols with special HTML characters Encode the mailto: and @ characters with this code:
mailto: changes to mailto
@ changes to @
The email link HTML code to hide your email address will look like:
<a href = "mailtoname@domain.com" >hidden email</a>
Hide email using CSS trick (direction property)
Scramble the email - While coding HTML, jumble and write the email address in reverse direction. (a@b.com should be written as moc.b@a). We can then use CSS stylesheet to reverse the email address againwhen rendering. Here's the sample HTML code with CSS.
<style type="text/css"> .backwards {unicode-bidi:bidi-override; direction: rtl;} </style>
<span class="backwards">moc.b@a</span>
If someone copies your email address, it will available in the reverse direction. Would not work on older browsers.
Use Macromedia Flash
You can easily create a tiny.swf file in Flash with embedded mailto: behaviour. The button action used to pick up the text held in the variables is:
on (release){ getURL ("mailto:" +recipient+ "?cc=" + cc + "&subject=" + subject + "&body=" +body) }
Requires Macromedia Flash player on client's machine.
How to hide your email address from spammers with JavaScript
Let's look at more advanced methods that use javascipt to hide the email (name@domain.com). Remember to use noscript tags since some users prefer to disable javascript in browsers:
1. Basic Email Script
<script language=JavaScript>
<!--
document.write("name" + "@" + "domain.com");
//--> </script>
2. Basic Mailto: Email Script with Link Text
<script language=JavaScript>
<!--
var user = "name";
var host = "domain.com";
var link = user + "@" + host;
document.write("<a hre" + "f=ma" + "ilto:" + user + "@" + host + ">" + link + "</a>");
//--> </script>
3. Inline JavaScript
<a href="#" onclick="JavaScript:window.location='mailto:'+'name'+'@'+'domain'+'.com'" >Send me an email</a>
4. External JavaScript file
<script language="JavaScript" src="email-encoding.js"></script>
The external javascript contains the code mentioned in 2 above.
The best method to hide Email Address From WebBots
No one likes unsolicited email. Encoding email addresses on your web site reduces the risk of spam but they are not foolproof methods. The best option is to replace your entire contact mechanism with a contact form and using the POST method while submitting the form.
Or maintain two e-mail addresses: one you give only to trusted people, the other you expect to get spammed.
Email harvesters are the most unwanted visitors on any website. These email spambots crawl the web via search engines to find and extract email addresses from webpages. Chat rooms are virtual magnets for email harvesting software. Email harvesters also scan public areas of the web like internet newsgroups, listserv and forums, blog comments area, "Contact Us" webpages, mailing list archives and guest books. To fool email spammers, let's see how spambots search for email addresses embedded in web pages.
See updated guide: How to Hide Email Address on Websites
How email spammers operate?
Email addresses always contain an @ symbol. Most spambots do a pattern-search for likely combinations of letters (abc@xyz.com) like billgates@microsoft.com or larrypage@google.org in the HTML source of webpages. Often they just search for the @ character and grab all the letters on each side on the assumption that it's a valid email address.
How to keep your email address available to humans but invisible to email spiders?
There are tons of Email Address Protector software that claim to protect your email address in web pages and get rid of junk mail - Don't waste your money, they only encode your email or generate a javascript snippet. We will discuss manual email encoding techniques here. If a visitor clicks an encryped email link on your website, it will work as normal, but spam robots will not be able to extract the address from the link.
Replace the AT (@) and DOT (.) symbols:
The most common approach to block email harvesting is to remove the @ symbol. If you eliminate the @ from email addresses then most spambots won't be able to recognize that the text is actually an email addresses: Here are some examples:
a.p.agarwaal AT gmail DOT com
a.p.agarwaal (at) gmail.com
a.p.agarwaal@gmail.com
a.p.agarwaal_AT_gmail_DOT_com
Mask your email with tags, append meaningful words:
Consider "masking" your email address. Masking involves putting a word or phrase in your email address so that it will trick a harvesting computer program, but not a person. Some email masking examples commonly employed by newsgroups and mailing list subscribers:
a.p.agarwaal@gmail.com.nospam
a.p.agarwaal@gmail.com.removeme
a.p.agarwaal@REMOVE.gmail.com
Also known as email address munging - changing your real e-mail address in a way that will make it unavailable for harvesting.
Replace text with an image:
This technique involves creating a graphic or screen capture of your email address text in jpg, png or gif formats and display that picture instead of the actual address string. Robots and spiders can't read the text that is embedded in the image. Anyone who wants to email you will have to manually type in your address though.
Email Obfuscators
E-mail Obfuscator make you email less vulnerable to spammers. Using an online email Obfuscator, convert (or disguise) individual characters of your email address into corresponding ASCII code (a <=> a hex coding) For example, the email address a@b.com is represented in ASCII as:
a@b.com
The above ASCII string can be used as argument for mailto: protocol as shown here. Email addresses will appear perfectly normal, and will even be clickable, to human visitors to your website.
<a href="mailto:ASCII_STRING">e-mail to confuse sniffer ASCII_STRING </a>
Encode the mailto: and @ symbols with special HTML characters Encode the mailto: and @ characters with this code:
mailto: changes to mailto
@ changes to @
The email link HTML code to hide your email address will look like:
<a href = "mailtoname@domain.com" >hidden email</a>
Hide email using CSS trick (direction property)
Scramble the email - While coding HTML, jumble and write the email address in reverse direction. (a@b.com should be written as moc.b@a). We can then use CSS stylesheet to reverse the email address againwhen rendering. Here's the sample HTML code with CSS.
<style type="text/css"> .backwards {unicode-bidi:bidi-override; direction: rtl;} </style>
<span class="backwards">moc.b@a</span>
If someone copies your email address, it will available in the reverse direction. Would not work on older browsers.
Use Macromedia Flash
You can easily create a tiny.swf file in Flash with embedded mailto: behaviour. The button action used to pick up the text held in the variables is:
on (release){ getURL ("mailto:" +recipient+ "?cc=" + cc + "&subject=" + subject + "&body=" +body) }
Requires Macromedia Flash player on client's machine.
How to hide your email address from spammers with JavaScript
Let's look at more advanced methods that use javascipt to hide the email (name@domain.com). Remember to use noscript tags since some users prefer to disable javascript in browsers:
1. Basic Email Script
<script language=JavaScript>
<!--
document.write("name" + "@" + "domain.com");
//--> </script>
2. Basic Mailto: Email Script with Link Text
<script language=JavaScript>
<!--
var user = "name";
var host = "domain.com";
var link = user + "@" + host;
document.write("<a hre" + "f=ma" + "ilto:" + user + "@" + host + ">" + link + "</a>");
//--> </script>
3. Inline JavaScript
<a href="#" onclick="JavaScript:window.location='mailto:'+'name'+'@'+'domain'+'.com'" >Send me an email</a>
4. External JavaScript file
<script language="JavaScript" src="email-encoding.js"></script>
The external javascript contains the code mentioned in 2 above.
The best method to hide Email Address From WebBots
No one likes unsolicited email. Encoding email addresses on your web site reduces the risk of spam but they are not foolproof methods. The best option is to replace your entire contact mechanism with a contact form and using the POST method while submitting the form.
Or maintain two e-mail addresses: one you give only to trusted people, the other you expect to get spammed.