Avoid Mailto tag

Q. How can I avoid using the "mailto:" tag on my website to prevent spam?

One way that spammers get your email address is with programs that automatically grab them from your web page. Some PC viruses also utilize email addresses that have been stored in a user's web cache (i.e. someone has visited your web page and now has your address in their cache, they get a PC virus which uses your address as the sender of infected mail).

To prevent this you can use a cgi program to create a mail link, then use only an icon or the word "email" on the page itself instead of the actual address. The link will be

/cgi-bin/nomail.cgi/foo/0/2

where "foo" is your local username. This will be visible in the display bar at the bottom of a browser, but will not be available to automated address gathering programs.

See the email tag on any of the official pages under http://www.cs.sunysb.edu/people/faculty/index.html for a working example.

In addition to the CGI program described above, there are some other ways of obscuring your email address on a web page. You may find these preferable especially if you have web pages on a host outside the CS department which does not have this CGI available to you. One of the best methods for obscuring your email address is to publish it as an image rather than text.

Use Images Instead of Text

If you use a graphic image rather than text to display your email address it cannot be grabbed by automated programs. You can use any simple graphics program, such as MSPaint for example. Use the following steps, adapted as needed for your graphics program:

  1. Begin a new image. Set the background color to the color of the web page you will put it on.
  2. Use the text tool to enter your email address. Use a simple typeface and a medium font size so that it will be legible to any browser.
  3. Use the selection tool to grab a rectangle encompassing the email address.
  4. Save the selected are into gif or jpeg format.
Then insert the address onto your web page with code similar to (but adjusted as needed):
<img src="images/address.gif" border=0 hspace=30 vspace=0 alt="address
image" width=172 height=15>

[FAQ by Index] [FAQ by Category]