Posts

Showing posts with the label Email

How to obfuscate, cloak or hide your email address from spammers in your website

Image
Whenever you publish your email address on your website, it will be vulnerable to email harvesters and spammers.  What they usually do is they use their own software that "crawls" over millions of websites and search and scan the all the texts and look for those words containing the email patterns. A a typical HTML code for an email link would look like this:   <a href= "mailto:myEmail@myDomain.com" > myEmail@myDomain.com </a>     As a good practice, we have to make sure that email addresses that appear on your site are obfuscated or cloaked.  In this way, only people can read it but not by bots and other web-crawlers. Email addresses can be made un-readable to these software by not putting the email address directly as plain text.  We can use the power of JavaScript to compose your email address. I'll show you how we can do this by following these steps: Step 1:    Create an anchor element and assign an ID to it. In this e