Browse DevX
Sign up for e-mail newsletters from DevX

Tip of the Day
Language: Web
Expertise: Intermediate
Dec 9, 1998



Building the Right Environment to Support AI, Machine Learning and Deep Learning

Preventing Your E-mail Address From Being Harvested

The Web has long provided a way to embed an e-mail address in a clickable link with the mailto: tag. However it didn't take long for spammers to develop robots that harvest Web pages' embedded e-mail addresses, for use in building and selling spam lists. If you want to avoid being harvested, but still want to provide a way for visitors to your site to send a message, you can consider a couple different approaches.

You can use mailto: with some letters represented as numbered entities. So instead of using this line to embed an e-mail address on your Web page:

<A HREF="mailto:webmaster@widget-factory.com">Send the webmaster 
you would use:
<A HREF="mailto:web&#109;aster@widget-factory.com">Send the webmaster 
Most browsers will substitute "m" for &#109; but many robots do not.

Another approach is to use a CGI script to provide a feedback/mail form.

Erik Goetze
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date