Department of Engineering

IT Services

E-mail addresses on web pages

Spammers very often obtain e-mail addresses by automatically extracting them from the text of web pages. This 'harvesting' has reached the point where you should no longer publish e-mail addresses on public web pages unless it is absolutely necessary. And if it is necessary, you should always take precautions to minimise the chances of the addresses being harvested.

There are three broad cases where it is necessary to publish addresses:

  1. Lists of contact addresses
  2. A single contact address where part of the purpose of the page is to encourage contact.
  3. There should be a contact address at the foot of every page, to allow for enquiries about the information on it.

In each case, there are ways to publish the addresses that reduce the chances of them being 'harvested' for spam, while not causing too much inconvenience to you or to the people reading your pages.

  1. Lists of contact addresses
    At the top of a list, include a rubric along the lines of "unless otherwise specified, add to the addresses shown". In the list itself, show only the usernames (i.e. the part before the @ sign). You can see an example of this on the Department's 'contact information' page.
  2. A single contact address in the text
    Type the address in full, but replace the @ sign with the HTML code @ e.g. The result appears in the browser as if the address were normal, but it is much less likely to be captured by spammers:
  3. At the foot of a page
    If the contact point is a named person, show the address like this: Chris Parker (cp12) . That is, their name plus the username part of their e-mail address. Both the name and the username should be a link to, which explains how to contact the person.

    If the contact point is a 'role address' such as webadmin, then use just the username part of the e-mail address, as at the bottom of this page. Again, the text should be a link to