Obfuscating Email Addresses

Posting an email address on a public web page is a recipe for disaster. It’s the way to get a metric truckload of spam. This, of course, makes it unfortunately difficult to allow visitors to a website to contact you without inviting the spammers in as well.

The two primary methods used to combat this issue are contact forms, which have their own issues with spam, and obfuscation. There are plenty of pre-made contact form scripts, the better of which have some anti-spam measures in place (cforms and Contact Form 7 are popular options for WordPress). But what about obfuscation, for those times where it’s better to simply list the address rather than installing a whole form?

I’ve found a couple of good articles on the subject, for those of you who want something a little more complex than simply writing like “my email AT example DOT com.”

A List Apart’s Graceful E-Mail Obfuscation is an interesting read, though their solution is a bit involved and requires a bit of server-side scripting for it to work.

Perishable Press’s Best Method for Email Obfuscation? is a reasonable comprehensive guide, with plenty of clever methods to choose from, and pros and cons for each. I liked the techniques that involved writing the email backwards, or inserting null text in an HTML span, and using CSS to flip the text or remove the span of null text. Those two options don’t play nicely with copy/paste, though.

  • http://austinpassy.com The Frosty

    Have you seen this snippet from css-tricks..

    • http://www.webmaster-source.com Matt

      No, I hadn’t. That one looks good, too.