OWLSweb HomeOWLSnet Home Outagamie Waupaca Library System — Local Libraries Better Together
Updated: July 9, 2007

computer iconWebmeister How To Files

Prevent Robots From Harvesting Your Email Address

Robots scan the text of your web pages for information. Usually it’s for a good purpose, like indexing your pages for a search engine’s database. However, some robots are used by spammers who want to collect email
addresses to send their junk to over and over again.

Don’t let them find you! Use the following code instead of a mailto: link on your web
pages. Here’s how to do it in Dreamweaver:

  1. Drop your cursor on the page where you want the email link to appear.
  2. Switch to CODE VIEW if you aren’t there already.
  3. Copy and paste the following code, keeping spacing exactly the same:

    <script language="javascript" type="text/javascript">
    <!--
    var theuser = "bcarpent";
    var thehost = "mail.owls.lib.wi.us";
    var themessage = "Contact the OWLS Webmeister";
    document.write("<a href=" + "mail" + "to:" + theuser + "@" + thehost + ">" +
    themessage + "</a>")
    //-->
    </script>

  4. Modify the necessary elements:

    bcarpent would be changed to the first part of your email address username.
    mail.owls.lib.wi.us would likely remain the same.
    Contact the OWLS Webmeister could be changed to whatever text you want people
    to click on as the link to send an email.

  5. That’s it!
    NOTE: When you view the page in DESIGN VIEW, you will not see the script or the link
    text. It will look like nothing is there. Just check the code, upload your page, and test!

OWLS logoSupporting public libraries in Outagamie and Waupaca counties
© Outagamie Waupaca Library System · 225 N. Oneida Street · Appleton, WI 54911 · 920.832.6190
All rights reserved.