treehouse : what would you like to learn today?
Web Design Web Development iOS Development

Should I bother encrypting email addresses in the HTML?

  • I learnt that It's always a good idea to use services that encrypt email addresses to help minimise spam, but nearly always when I see a nice site and have a little snoop around in the code (as you do) to help develop my skills, I take note if they have jumbled up code instead of showing their email address, and they never do.

    The sites seem as though they were built by professional and knowledgeable designers, but they don't seem to worry about hiding their email address.

    Should I also not bother?

  • Consider:

    (1) An encrypted email address is completely unusable unless it can be decrypted.

    (2) You want the user to use the email address (otherwise, you wouldn't have given it to them). Therefore, the user (specifically, the user's browser) must be able to decrypt the email address.

    (3) The only way that will happen is if you provide instructions on how to do so. At this point, anyone can decrypt it (including spam bots), so why bother?


    A way around this is to simply not give out any email addresses. Use a contact form instead; that way, the user doesn't have your email address until you've received their message and decided that it's worth replying to.