Show Your Email Address To Humans But Not to Spiders

July 3, 2008

Using Javascript you can show display your email address on your website in a way that humans can read it but web spiders can't. (That is my argument anyway.)

Here is the code:

// Define the different parts of the email address
var EmailUser = "tietjen.anthony";
var EmailServer = "gmail";
var EmailTopLevel = "com";

// Put the parts of the email together
var EmailAddress = EmailUser + "@" + EmailServer + "." + EmailTopLevel;

// Display the email address
document.write('');


That code will display the email address in a web browser, but when web spiders try to scan the site for email addresses, they shouldn't be able to pick it up. This is because it is split up into different sections in the code, but when the browser processes the javascript it displays it all put together.
Anthony Tietjen

About the Author

Anthony Tietjen is a software engineer with experience across desktop, mobile, and web development. Husband and father, with a passion for music and the outdoors. Connect with Anthony on LinkedIn and X/Twitter