How to Avoid Email Spam – The Code That Will Save Your Inbox

How to Avoid Email Spam

If you have a website or blog, your more than likely have a contact page with your email on it, so your clients, customers, or readers can get in touch with you. But, if you’ve got your email written plainly out there, or you’re using a mailto link, you’ve made a big mistake. The same mistake I made years ago, and I’m still paying for it. The number of spam emails I have to delete from my inbox every day is the bane of my existence. It gets in the way of running my business and my blog. And there is NOTHING I can do about it (at this stage at least). Hopefully you can learn from my mistakes and get rid of the spam before it even starts.

How to Avoid Email Spam

If you put your email address out on the internet without any protective code, you are setting yourself up for an inbox full of spam. On my old blog, The Crafty Frugaler, I put my email on my contact page using a mailto link, and ever since then I’ve been getting ridiculous amounts of spam in that inbox. Even now that I’ve realized my mistake and taken my email address down, the spam still flows in every day.

This is because internet crawlers and bots from spammy sites crawl the internet looking for email addresses to harvest, and add to their mailing list. Though the law states that you have to be able to unsubscribe from a mailing list, and that you have to opt in in the first place, these sites don’t care and use your email address to send you crap. But, how do you make it possible for people to contact you, without making yourself vulnerable to these spam bots? Below are some different ways to display your email address, using the email address someone@example.com in each.

Normal Email (Spammy)

The standard way to place your email address on a page is using a link like this, which people can click on and open a new mail window. But, spam bots can still see emails like this, even though they are hidden behind an html link.

Which will look like this:
Send Mail

Spam Free Email #1 – Plain Text

Some people have come up with a fairly clever way of writing their emails in plain text, like this, though the address is inconvenient because it’s not clickable.
Email me at someone AT example DOT com
It’s easy enough to put the address together yourself, but it’s inconvenient, and does leave a little room for error when people have to type the name themselves.

Spam Free Email #2 – Form

Another way to protect yourself is by creating a form on your site that people can fill out and it will send you an email. This protects you from spam because it does not publish your email address to the public, and the email is sent indirectly to you through your CMS. Though it’s still possible for spam bots to send you emails this way (that’s why you sometimes see a link that says ‘check if you are a real human’ or captcha links that you have to fill in) it’s harder for them to actually extract your email address and add it to their list. In the standard WordPress post or page editor, there is a button at the top that says ‘Add Contact Form’ where you can insert a standard contact form into any post. You can use that button, which will insert a code that looks something like this.

However, it’s important that you don’t select any email notifications. If you do, this sends an email to you when the form is filled out, but it also puts your full email address as part of the code. It’s better to select no email notifications when creating the form itself, and then in the backend general form settings, select that you want to be notified any time someone fills out a form.

Spam Free Email #3 – Javascript

If you don’t want to create a contact form, and you just want a simple link to your email address on your contact page, there is now a javascript link that can help with this. Rather than just writing your email address straight out, it uses code to separate the different elements of your address, so spam bots can’t extract it. Just copy the code below and insert your email address in place.

Which will look like this:

Spam Free Email #3 – Unicode

One last way to protect yourself is to covert your email address to a code that the spam bots can’t recognize (though I’m sure eventually they will find a way to). You can use this tool and type in mailto:someone@example.com (but your email address) in the first box. Then copy the unicode values that it gives you, they will be long and look weird, and paste them into a link like this:

Which will look like this:
Email me

For now, these methods will keep you safe. The only problem is that just as we find new ways to protect ourselves from spam, others are creating new ways to harvest addresses despite them. You just need to stay up to date with the best and latest way to fight spam, and make sure you never get left behind using an old, faulty method.

Luckily my old blog domain is expiring soon and I won’t be renewing my registration, which means I’ll no longer be using the email address. I’ll be able to escape the spam since all my other addresses haven’t been harvested (yet). If you’ve got an email address that is filled with spam, unfortunately the only way to escape is to create a new address and make sure you don’t publish it freely. Luckily, email addresses are usually free with most hosting plans, so it shouldn’t cost you anything to start over, though it’s definitely inconvenient.

How do you fight email spam? I’d love to know if you’ve found a way I haven’t mentioned. Let me know in the comments below!

4 thoughts on “How to Avoid Email Spam – The Code That Will Save Your Inbox”

  1. I haven’t had to deal with spam on my blog account (yet), but my personal one. Sheesh. Some of it is my fault for giving it out to places that signed me up for junk, but I’m fairly certain it has been picked up elsewhere as well. So annoying! Good tips!

    1. Agreed, it’s so frustrating. I’m trying hard to keep my two main email addresses safe, and then I have one whole address specifically for things like newsletters and account signups that I think might lead to spam. That way I can always escape it when I need to focus on only important emails. But my old blog email.. ugh, it’s basically dead and gone. I’m just waiting for the domain to expire so I can have an excuse to get rid of it!

Leave a Reply

Your email address will not be published. Required fields are marked *