Email Obfuscation or Email Hiding is an attempt to hide a valid email address on a web page from being scraped to avoid receiving spam.
Email Obfuscation differs from email encryption in that obfuscation conceals the actual email address from web scraping, while email encryption conceals the contents of an email message in transit.
Email Obfuscation falls into a few categories:
All of the above methods are used instead of the internet standard mailto: URL scheme which is used in a link tag in HTML:
<a href="mailto:support@example.com">Contact Support</a>
Contents |
To fully understand how email obfuscation works, the following HTML:
<a href="mailto:support@example.com">Contact Support</a>
... will be obfuscated using the techniques shown above.
A simple method of communicating an email address to a person is via an image which contains rasterized text of the email address. The web page visitor then needs to type the text directly into their email program in order to send a mail to the email address.
Similarly, Adobe Flash can be used to display an email address.
This method uses Character encodings in HTML, or JavaScript to hide or otherwise obscure an email address. A simple technique is to simply use HTML Entities to encode the email address:
<a href="mailto:simple@example.com">Contact Support</a>
Alternate methods use JavaScript to generate the email address using a simple form of encryption.
<script type="text/javascript">
var e = unescape("Af%25mwjkB%27rfnqyt%3FxzuutwyEj%7Dfruqj3htr%27CHtsyfhy%25XzuutwyA4fC");
var i,p='';for(i=0;i<e.length;i++){p+=String.fromCharCode(((e.charCodeAt(i)-37)%240)+32);}
document.write(p);
</script>
The above code will generate a tag identical to the plain email.
A puzzle email is a primitive form of CAPTCHA which requires the user to solve a simple puzzle to determine the email address:
<a href="mailto:supNOSPAMport@exaNOSPAMmple.com">Contact Support</a> (Remove NOSPAM)
Another example:
Contact Support: support -at- example -dot- com
Simply enough, a site visitor needs to read the additional text and perform some simple manipulation or substitution to determine the actual email address.
This method involves programming in a web server scripting language. The process is: