random technical thoughts from the Nominet technical team

Using character data to mask email addresses

1 Star2 Stars3 Stars4 Stars5 Stars (2 votes, average: 3 out of 5)
Loading ... Loading ...
Posted by jay on Nov 26th, 2006

Thanks to Mark Baker who showed me this little trick.

Whenever you display and email address in a web page there is a good chance a spambot will harvest that address and add it to a database. This technique allows you to publish email addresses in a way that browsers and email programs correctly understand but very few spambots do.

The way it works is to write out the email address using HTML character data - i.e. each letter is written like &#number; . So the email address jay@nominet.org.uk gets written in HTML as follows (line breaks added for clarity)

<a href=”mailto:&#106;&#097;&#121;&#064;&#110;
&#111;&#109;&#105;&#110;&#101;&#116;
&#046;&#111;&#114;&#103;&#046;&#117;
&#107;”>&#106;&#097;&#121;&#064;&#110;
&#111;&#109;&#105;&#110;&#101;&#116;
&#046;&#111;&#114;&#103;&#046;&#117;
&#107;</a>

which ends up looking like this:

jay@nominet.org.uk

Can you tell the difference?

Some of you may be thinking that this trick will be quickly discovered by spambot authors. However I think that spambots are generally only after the quick pickings and unless this trick becomes very popular it is not going to appear on their radar.

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.

Recent Posts

Highest Rated

Categories

Archives

Meta: