Loading...

Knowledge Base
Up to 75% off on hosting for WordPress websites and online stores

How to Hide Email Addresses from Bots and Spammers

When dealing with an increase in spam emails, bots may have harvested your email address from your website. Fortunately, there are ways to protect your email from spammers while making it accessible to legitimate users. This guide will show you a simple JavaScript method to hide email addresses from bots and spammers, ensuring your contact information stays secure.



Steps to Hide Email Addresses from Bots and Spammers

Using a small piece of JavaScript can:

  • Prevent email harvesters from detecting your email address
  • Protect your email from spammers
  • Allow users to contact you

Here's a step-by-step method to hide your email from spambots.

  1. Insert a small JavaScript snippet into your webpage's HTML where you want your email displayed.

    JavaScript to Hide Email (Example):

    <SCRIPT TYPE="text/javascript">
    
     emailE = 'example.com'
    
     emailE = ('yourname' + '@' + emailE)
    
     document.write('<A href="mailto:' + emailE + '">' + emailE + '</a>')
    
    </script>
    
    
  2. To tailor this JavaScript code to your website, modify the email address section to reflect your website's contact email. Here's how you can adjust it:

    • Replace 'example.com' with your email domain (for example, bluehost.com)
    • Replace 'yourname' with your email prefix (for example, 'contact' if your email is [email protected]).
    • Ensure the rest of the script remains the same to maintain the functionality of creating the clickable mailto link.
  3. Insert the following link where you want the email address to appear on your webpage:
    <a href="javascript:m_sfcon('YOUR-EMAIL-PREFIX-GOES-HERE')">Email Me</a>
    
    

    This will display the text 'Email Me' as a clickable link for users to email you.

  4. After adding and customizing the code, test the link on your website to ensure it works correctly. The email address shouldProtect Email from Harvesters but still be accessible to legitimate users who click the link.

Why Should You Protect Email from Bots and Spammers

Email harvesting bots scour the internet, looking for email addresses to send unsolicited emails or spam. By hiding your email address in the way described above, you make it much harder for these bots to find and use your contact information. This reduces the risk of spam and secures email contact information.

Summary

Protecting your email from spammers and bots is vital in this digital world. With this simple JavaScript method to hide email addresses from spammers and bots, you can keep your contact information safe while offering users an easy way to reach you. All this keeps your email safe from those spam messages; otherwise, it may give you an impossible headache by getting too numerous to handle.

If you need further assistance, feel free to contact us via Chat or Phone:

  • Chat Support - While on our website, you should see a CHAT bubble in the bottom right-hand corner of the page. Click anywhere on the bubble to begin a chat session.
  • Phone Support -
    • US: 888-401-4678
    • International: +1 801-765-9400

You may also refer to our Knowledge Base articles to help answer common questions and guide you through various setup, configuration, and troubleshooting steps.

Did you find this article helpful?

 
* Your feedback is too short

Loading...