Hide your email address on websites from spam

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.

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:

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 <=> &#x61; hex coding) For example, the email address a@b.com is represented in ASCII as:
&#x61;&#x40;&#x62;&#x2e;&#x63;&#x6f;&#x6d;
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 &#109;&#097;&#105;&#108;&#116;&#111;
@ changes to &#064;

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:

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.