Webguide Home | Search
New York University

FAQs

How do I prevent my published email address from being harvested by spammers?

To prevent the harvesting of your or your organization’s email address from your web pages on NYU Web, we recommend that you implement one of the two solutions offered below to replace your "mailto" links on html pages.

JavaScript Replacement

For example, if your email address is mysite.info@nyu.edu, you would insert the following code, replacing “user” with the information to the left of the @ sign and replacing “site” with your host name.

<script type="text/javascript">
<!-- Begin
user = "mysite.info";
site = "nyu.edu";

document.write('<a href=\"mailto:' + user + '@' + site + '\">');
document.write(user + '@' + site + '</a>');
// End -->
</script>

ASCII Code Replacement

You can replace the "@" sign in your mailto links with the ASCII code equivalent: &#064;

For example, if your email address is mysite.info@nyu.edu, you would do the following:

<a href="mailto:mysite.info&#064;nyu.edu">mysite.info&#064;nyu.edu</a>

This will produce a link that says mysite.info@nyu.edu


If you'd like to have your email address automatically encoded into ASCII format, you can use the utility at this website: