If you have a online presence, whether it’s personal or business, you most likely are looking for input back from your visitors. But, be careful if you put your email address in a simple mailto: link. You will get spam, accept it.
But, there are a few tricks you can use to limit the spam you get.
Before we get into the tricks, let’s look at how spammers get addresses off of web sites. Spammers use web robots similar to the type used by search engines to crawl the web. During the crawl, anything that appears to be an email address is added to their database.
So, all you can do to limit the spam is to make it harder on these robots to get your address. The problem with that is by making it harder for the robot, you also make it harder on your users. Below I’ll show you a few different ways that help to make it more difficult on the robot while still allowing your user to contact you relatively easily.
Hopefully there really isn’t a email@example.com, since that’s the address I’m going to use as my sample. :-)
The most secure way to block you email address is to hide it behind some sort of server-side script.
For a contact form, you would code a form in HTML and have its action post to a script. You email address is in this script, which the robots and users never see.
If you want to go with this technique, look into PHP’s mail function, or the equivalent in ASP or whatever scripting language you’re using.
For most users, this will create a link like this: Send me an email.
Let’s look at this a little closer. Lines 2 and 3 set the user name and domain for the email address. Line 4 writes out the link with the variables appended in. Lines 1 and 5 open and close the script.
Encoding the address
HTML doesn’t have to be actual letters. You also have the option of using ASCII codes directly. So, instead of typing the letter ‘a’, you can type ‘a′. Obviously, not the most efficient method for typing, but it works well for this.
So, instead of typing in <a href=”mailto:firstname.lastname@example.org”>Send me an email</a>, you can type <a href=”mailto:email@example.com”>Send me an email</a> and it will look just the same. Don’t believe me? Here are the two links. Send me an email and Send me an email. Click on either and your mail client should pop up with an email addressed to firstname.lastname@example.org.
This method is fairly effective. In fact, I use it on one of my other sites. I still get some spam at that address, but only 2 or 3 a week.
If you want to try this method yourself, go to this link to convert your address. It’s much easier than figuring it out yourself.
While this tricks most spam robots, some will pick it up and get your address.
Make it human readable only
Humans can make sense of text that robots will not. So, you can use an address like bobNOSPAM@email.com, and most people will understand. Even better would be bob@NOSPAMemail.com because that would probably put it on a non existing server and the message would bounce back to the spammer.
The problem here is that it leaves it up to your user to figure it out. Most will, a few won’t.
Robots are starting to get this trick, too.
If you create an image with your email address and do not create a link with it, the robot will not know what to do, but people will.
However, this forces your users to type in your address, and many will not.
Again, some robots can get the address, but most cannot.
So, what to do? Do you choose to not allow user contact, or open yourself up to spam? You can see what I do. The only thing that looks like an email address on this site is the title. But, email@example.com is not a valid email address.
While not really related to this topic, but I have a couple of other suggestions.
First, have a dummy email address for anytime you enter an email address for contests, etc. Yahoo and Hotmail are good for this. I have a junk@…. email address just for this purpose.
Second, have an address just for your domain registrations. You will get a lot of spam at this address. But, it’s pretty easy to filter when it’s only coming to one place. But, it’s pretty important that your domain registrar can get in touch with you.