Protect Your Email Address
1 03 2010This is just a quick post to share something too many people don’t know: how to protect your email address so that bots can’t harvest it and you won’t start receiving tons of spam.
You see, when you put your email address on your website, it’s very simple to read it, add it to a list and then bombard it with unsolicited email. It’s annoying, but it’s easy to fix in two steps.
Step 1: Convert your address into an image
To do this, visit http://services.nexodyne.com/email/ if you use a web-based service (like Gmail) or http://services.nexodyne.com/email/index_custom.php if you email account is in your own domain.
Pick colors for text, background and border, choose a font and click Generate. Then, save the generated image to your computer. When you do, use a file name that nobody would link with email addresses, such as nospam.png.
Finally, upload the image to your website. I will use images/nospam.png as an example.
Alternatively, run any image editor, type your email address in as text, (crop, resize and make any other modifications until you’re happy with what you get) and save the image.
Step 2: Clock your email address image
In your contact page code, include the following snippet of JavaScript code, which opens up a new message window on the site visitor’s, to be sent to your email address.
Replace “[your real email address]” with your real email address.
<script type="text/javascript">
function emailUs(){
var daReferrer = document.referrer;
var email = "[your real email address]";
var subject = "Website inquiry";
var mailto_link = 'mailto:'+email+'?subject='+subject;
win = window.open(mailto_link,'emailWindow');
if (win && win.open &&!win.closed) win.close();
}
</script>
To use your image, all you have to do now is include the code below:
<a onclick="emailUs();" href="#"> <img src="images/nospam.png" border="0" alt="I hate spam" align="absmiddle" /> </a>
This will look like a valid email address to a human being, but complete gibberish to an automatic robot.
Final note: bots are getting smarter all the time, so you may choose to do some more editing to your image or use another image generating site to make the image harder to decipher.
That’s it! You’re protected, but your clients can contact you by email.
Gal
Categories : Web Presence
