Skip to main content
Inspiring
August 31, 2017
Answered

It's 2017, what's the easiest was to protect an email address on a website?

  • August 31, 2017
  • 2 replies
  • 630 views

After Googling various options, it appears the Javascript one might be the easiest for the average web designer.

It's described in a brief blurb at the bottom of the following page :

Website Creator | Avoiding Spam When Posting an Email Addr...

How reliable is this method in 2017?

I don't need full-proof, I just don't want to wind up with 100 spam emails a day within a week, which is what happens every time I don't take any steps to make it harder for the bots.

    This topic has been closed for replies.
    Correct answer Teodor K

    The easiest way to protect your email (either used within a mailto: link, or pasted on the page) from being collected or spammed by bots is to encode it.

    So in the source code it is encoded, and on the page your users see it as it is:

    j1jmLqP_SXqaMxZcc2NcCQ.png

    There are many places to encode it, for example this one: Encode Email Address to HTML Entities

    2 replies

    Teodor K
    Teodor KCorrect answer
    Participating Frequently
    September 1, 2017

    The easiest way to protect your email (either used within a mailto: link, or pasted on the page) from being collected or spammed by bots is to encode it.

    So in the source code it is encoded, and on the page your users see it as it is:

    j1jmLqP_SXqaMxZcc2NcCQ.png

    There are many places to encode it, for example this one: Encode Email Address to HTML Entities

    ---DMXzone | Wappler
    Nancy OShea
    Community Expert
    Community Expert
    August 31, 2017

    Do you want EASY or RELIABLE? 

    EASY - don't publish your email address anywhere on the web.  So called email obfuscation techniques are easily defeated by turning off JavaScript. Since spambots don't use JavaScript, the better programmed ones will penetrate obfuscation without much trouble.

    RELIABLE -- use a contact form with a server-side script like PHP.  Ideally the script should conceal email address, thwart robot submissions and sanitize form data before it's processed.

    Nancy

    Nancy O'Shea— Product User & Community Expert