To sustain this free service, we receive affiliate commissions via some of our links. This doesn’t affect rankings. Our review process.
How Does My Email Get Harvested?
The basic idea here is to encode your email address so it will not be easily harvested by robots crawling the Internet in search of email addresses. These robots are based on a script that searches for the “mailto:email@example.com” string (this example will probably be harvested, but it won’t do them any good since the email address is not valid).
Hiding Your Email Address With JavaScript
There are several ways to hide your email address (such as using <code> around the @ symbol, replacing the @ symbol with its HTML character equivalent (@), and more – but these are not as effective or secure as using js).
By using JavaScript to generate the email string, we can break up your email pattern so it will no longer be recognizable by the email harvesters (this example is based on an email alias from our old company name). We also escape certain alphabetic characters. Visit our html escape characters article for a complete list of valid html (and xhtml) escape characters.
<script type="text/javascript">
<!--
emailMe=('inf' + 'o' + '@' + 'Contrac' + 'tWebDe' + 'velopme' + 'nt.com')
document.write('<a href="mailto:' + emailMe + '">' + emailMe + '</a>')
//-->
</script>
<noscript>Our email address is scripted to prevent spam. If you cannot see it, please enable JavaScript or use the Contact Form below to contact me.</noscript>
NoScript Tags For Non-JavaScript Users
Since not everyone has JavaScript support turned on, it is a good idea to include the <noscript> tags to notify these users that they are missing out on a feature that relies on JavaScript. In our case, we notify the user that we have used the JavaScript to reduce email spam, and leave them with two options. One, they can turn on JavaScript so they may see our email address, or two, they can use our contact form to get in touch with us.
Did Your Email Address End Up On A Blacklist?
If you’re having trouble getting your emails to reach their destinations, or recipients are letting you know that your emails are frequently ending up in their spam folders, your email address may have ended up on an email blacklist. But have no fear! Our experts show you how to get it removed in our email spam blacklist guide.
Disclaimer: This website contains reviews, opinions and information regarding products and services manufactured or provided by third parties. We are not responsible in any way for such products and services, and nothing contained here should be construed as a guarantee of the functionality, utility, safety or reliability of any product or services reviewed or discussed. Please follow the directions provided by the manufacturer or service provider when using any product or service reviewed or discussed on this website.
Nowadays lots of spammers got into our e mail address and they are that annoying and even pissed us off most of the time. I haven’t try to open yet my JavaScript. But I will include it later. Thank you for the information. I hope it works.
Cathlene
Thank you! I’ve been getting soooo much spam this year. I hope this javascript anti-spam technique will help!