Viagra without a prescription, Rolex watches for absurdly low prices – such offers or similar ones end up in every electronic inbox sooner or later. The sinister figures sending out spam e-mails are searching the internet for e-mail addresses with spambots. The search is easy – the bots recognize e-mail addresses by the @ sign.

Here are two tips on how to effectively protect your website from spambots:

  1. Do not publish your e-mail address anywhere on your website – not even when replacing @ with ‘at’. Bots are stupid, but still smart enough to recognize an e-mail address.
  2. Replace all e-mail addresses with a contact form. If you built your site with SITES, this is very simple and 100 percent secure.

No power to spambots

Since April 1, 2012, all business websites in Switzerland have an obligation to provide contact data (Impressumspflicht). An e-mail address is part of an impressum (you can create an impressum for free by using the impressum generator from Brunner Digital). It is important that you encrypt your e-mail address, and the quickest and most secure way is with a bit of JavaScript. Just replace the <a> link containing your e-mail address (e.g. fritz@meier.ch) with the following JavaScript:

<script type="text/javascript">// <![CDATA[
var a="fritz";
var b="meier.ch";
document.write('<a href="mailto:'+a+'@'+b+'">'+a+'@'+b+'</a>');
// ]]></script>
<noscript>fritz [at] meier [dot] ch</noscript>

Visitors who have JavaScript activated in their browser are able to see the entire e-mail address fritz@meier.ch and can click on it. Visitors who haven’t activated JavaScript will see fritz[at]meier.ch and can adapt the copied address in their mail program. Since they don’t understand JavaScript, spambots will be flummoxed by both versions – and you don’t have to worry about spam e-mails.

No power to spambots!

Sandro Bertschinger

He didn't find computers very interesting for quite some time. An Amiga 500 as a games machine was the high point at that time. Computers began to move into his focus with the advent of the internet and the possibility of building cool websites. In 2001, he crossed paths with an internet company by coincidence.

0