<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Garage &#187; spam</title>
	<atom:link href="https://invoicebus.com/garage/tag/spam/feed/" rel="self" type="application/rss+xml" />
	<link>https://invoicebus.com/garage</link>
	<description>Blog about running a business and solving invoicing and billing problems</description>
	<lastBuildDate>Thu, 30 Apr 2026 14:15:43 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.1.41</generator>
	<item>
		<title>How to Protect Your Email Address From Spam Crawlers</title>
		<link>https://invoicebus.com/garage/how-to-protect-your-email-address-from-spam-crawlers/</link>
		<comments>https://invoicebus.com/garage/how-to-protect-your-email-address-from-spam-crawlers/#comments</comments>
		<pubDate>Thu, 15 Mar 2012 22:26:21 +0000</pubDate>
		<dc:creator><![CDATA[Stefan Chachovski]]></dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[email protection]]></category>
		<category><![CDATA[spam]]></category>
		<category><![CDATA[spam crawler]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[tricks]]></category>

		<guid isPermaLink="false">http://garage.invoicebus.com/?p=1429</guid>
		<description><![CDATA[<p>The email addresses are not always stolen by leaving footprints on other sites. In most cases, they are stolen directly from your own web site. What are spam crawlers? Spam crawlers are automatically programmed bots that steal your email address from the web by various mechanisms and use it in bulk email or other purposes [&#8230;]<br />
<h3>Author information</h3>
<div class="ts-fab-wrapper" style="overflow:hidden">
<div class="ts-fab-photo" style="float:left;width:64px"><img alt='Stefan Chachovski' src='https://secure.gravatar.com/avatar/f03618a263cf869af3b1ebf44ebf6171?s=64&amp;d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D64&amp;r=G' class='avatar avatar-64 photo' height='64' width='64' /></div>
<p><!-- /.ts-fab-photo -->
<div class="ts-fab-text" style="margin-left:74px">
<div class="ts-fab-header">
<h4><a href="http://twitter.com/chachovski">Stefan Chachovski</a></h4>
</div>
<p><!-- /.ts-fab-header -->
<div class="ts-fab-content" style="margin-bottom:0.5em">
<p>Co-founder of Invoicebus. Huge lover of nature, science, and chocolate cherry cordials. He occasionally writes on this blog about Invoicebus' stuff. Hello him on <a href="http://twitter.com/chachovski">Twitter</a> or subscribe to his updates on <a href="http://facebook.com/cacovski">Facebook</a>.</p>
</div>
<div class="ts-fab-footer"> | <a href="http://twitter.com/chachovski">Twitter</a> | <a href="http://www.facebook.com/cacovski">Facebook</a> | </div>
<p><!-- /.ts-fab-footer --></div>
<p><!-- /.ts-fab-text --></div>
<p><!-- /.ts-fab-wrapper --></p>
<p>The post <a rel="nofollow" href="https://invoicebus.com/garage/how-to-protect-your-email-address-from-spam-crawlers/">How to Protect Your Email Address From Spam Crawlers</a> appeared first on <a rel="nofollow" href="https://invoicebus.com/garage">Garage</a>.</p>
]]></description>
				<content:encoded><![CDATA[<h2>The email addresses are not always stolen by leaving footprints on other sites. In most cases, they are stolen directly from your own web site.</h2>
<div style="height:20px;"></div>
<h3>What are spam crawlers?</h3>
<p>Spam crawlers are automatically programmed bots that steal your email address from the web by various mechanisms and use it in <a href="http://en.wikipedia.org/wiki/Distribution_list">bulk email</a> or other purposes usually referred as <a href="http://en.wikipedia.org/wiki/Email_spam">spam</a>. This process is also known as email address harvesting.</p>
<p><img style="margin:20px 0px;" src="http://garage.invoicebus.com/wp-content/uploads/2012/03/online-invoicing-spam-crawler.png" alt="Spam Crawler" title="Spam Crawler" width="600" height="420" class="alignnone size-full wp-image-1517" /></p>
<p>Contact details, terms and policies, about pages and pretty much everywhere on your site where you publicly expose your email address, is a great resource for crawlers.</p>
<p>The crawler or so called harvester automatically searches the HTML content of your web site, usually scanning the link tag <center>
<pre class="brush: xml; gutter: false; title: ; notranslate">&lt;a&gt;&lt;/a&gt;</pre>
<p></center> and searching the <b>href=&#8221;mailto:&#8221;</b> attribute inside.</p>
<h3>So what’s the idea?</h3>
<p>There’re few workarounds for protecting email addresses and you’ve probably seen solutions like displaying the email in format: info (at) invoicebus (dot) com, embedding the email into an image, implementing contact form etc. However, in all cases you don’t get clickable email link, so here we&#8217;re going to use a little hack.</p>
<p>Beside the <b>href=&#8221;mailto:&#8221;</b> attribute, the spam crawler scans every HTML code that contains “@” sign, so can easily figure out and extract the actual email address. Our objective is to keep the crawler task difficult as much as possible.</p>
<p>In fact, we&#8217;ll programmatically hide the email address behind variable and dynamically print it in run-time, exactly when the page is rendered by the browser. The crawler won’t be able to find it anywhere in the code.</p>
<div style="font-weight:bold; margin-top:20px; margin-bottom:10px;">How to assign a value to the variable so to the crawler couldn&#8217;t see it? </div>
<p>If we divide the email address on 3 parts,<br />
<img style="margin:20px 0px;" src="http://garage.invoicebus.com/wp-content/uploads/2012/03/online-invoicing-3parts-email.png" alt="Parts of the email address: Username, at sign, domain name" title="Parts of the email address: Username, at sign, domain name" width="306" height="65" class="alignnone size-full wp-image-1538" /><br />
we can assign the value sequentially in two steps by concatenating strings.<br />
Here’s the JavaScript snippet for it:</p>
<pre class="brush: jscript; gutter: false; title: ; notranslate">
&lt;script type=&quot;text/javascript&quot;&gt;

     var emailE = 'invoicebus.com';
     emailE = ('support' + '@' + emailE);
     document.write('&lt;a href=&quot;mailto:' + emailE + '&quot;&gt;' + emailE + '&lt;/a&gt;');

&lt;/script&gt;
</pre>
<p>The code will display the following link in the browser:</p>
<p><img src="http://garage.invoicebus.com/wp-content/uploads/2012/03/online-invoicing-support-email.png" width="151" height="17" class="alignnone size-full wp-image-1546" /></p>
<p>You can even write your own JS function that transforms the letters with custom pattern, but for now I’ll stick to the basics.</p>
<div style="background:#ffffe0; padding:10px; margin:20px 0px; margin-bottom:30px; border:1px solid #E6DB55;"><b>Note:</b> If the visitor of the site has disabled the JavaScript in his browser, the email address won’t be shown.</div>
<p>Of course, you also have another option of not using the JavaScript by directly encoding the value of the HREF attribute with HTML <a href="http://www.w3schools.com/tags/ref_ascii.asp">ASCII encoding</a> or <a href="http://www.w3schools.com/tags/ref_urlencode.asp">URL encoding</a>.<br />
<br/></p>
<div style="background:#f8f8f8; border:1px dotted #ccc; padding:20px; margin-bottom:25px;">
Clear HTML:</p>
<pre class="brush: xml; gutter: false; title: ; notranslate">
&lt;a href=&quot;mailto:yourname@domain.com&quot;&gt;yourname@domain.com&lt;/a&gt;
</pre>
<p><br/><br />
ASCII encoded HTML:</p>
<pre class="brush: xml; gutter: false; title: ; wrap-lines: false; notranslate">
&lt;a href=&quot;&amp;#109;&amp;#97;&amp;#105;&amp;#108;&amp;#116;&amp;#111;&amp;#58;&amp;#121;&amp;#111;&amp;#117;&amp;#114;&amp;#110;&amp;#97;&amp;#109;&amp;#101;&amp;#64;&amp;#100;&amp;#111;&amp;#109;&amp;#97;&amp;#105;&amp;#110;&amp;#46;&amp;#99;&amp;#111;&amp;#109;&quot;&gt;&amp;#121;&amp;#111;&amp;#117;&amp;#114;&amp;#110;&amp;#97;&amp;#109;&amp;#101;&amp;#64;&amp;#100;&amp;#111;&amp;#109;&amp;#97;&amp;#105;&amp;#110;&amp;#46;&amp;#99;&amp;#111;&amp;#109;&lt;/a&gt;
</pre>
</div>
<p>In both cases, the browser will display the following:</p>
<p><a href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;&#121;&#111;&#117;&#114;&#110;&#97;&#109;&#101;&#64;&#100;&#111;&#109;&#97;&#105;&#110;&#46;&#99;&#111;&#109;"> &#121;&#111;&#117;&#114;&#110;&#97;&#109;&#101;&#64;&#100;&#111;&#109;&#97;&#105;&#110;&#46;&#99;&#111;&#109;</a></p>
<p><br/></p>
<div style="background:#ffffe0; padding:10px; border:1px solid #E6DB55; margin-bottom:15px;"><b>Note:</b> Some spam crawlers can extract the email address even HTML encoded.</div>
<p><script language="javascript">
function invoicebus_encode(id1, id2) {
    var string = document.getElementById(id1).value;
    var str = '';
    for (i = 0; i < string.length; i++) {
        str = str + '&#038;#' + string.charCodeAt(i) + ';';
    }
    document.getElementById(id2).value = str;
}
</script></p>
<p>I quickly wrote a simple HTML ASCII encoder that can be used to encode your email addresses or any text you want.</p>
<table cellpadding=0 cellspacing=0 borders=0 style="text-align:center; margin-top:20px; margin-bottom:30px;">
<tr>
<td style="vertical-align:middle;">
Enter your email/text<br />
<textarea style="height:80px; width: 180px;" id="not_encoded"></textarea>
</td>
<td style="vertical-align:middle; text-align:center;">
<input style="width:150px; height:25px;" value="Hit me to Encode" type="button" onclick="invoicebus_encode('not_encoded', 'encoded');">
</td>
<td style="vertical-align:middle;">
Copy the encoded text<br />
<textarea style="height:80px; width: 180px;" id="encoded"></textarea>
</td>
</tr>
</table>
<p>There’re couples of other methods available, but I believe these two are the most effective ones, so far. It’s up to you which one you’ll choose. For us, JS method works pretty well.</p>
<p>A little effort and a few lines of code on your site will save you from tons of unsolicited and junk email later.<br />
<br/><br />
<b>Now let me hear your thoughts on it.</b><br />
Have any suggestions of how to improve these methods, or maybe some others we haven't heard about?</p>
<h3>Author information</h3><div class="ts-fab-wrapper" style="overflow:hidden"><div class="ts-fab-photo" style="float:left;width:64px"><img alt='Stefan Chachovski' src='https://secure.gravatar.com/avatar/f03618a263cf869af3b1ebf44ebf6171?s=64&amp;d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D64&amp;r=G' class='avatar avatar-64 photo' height='64' width='64' /></div><!-- /.ts-fab-photo --><div class="ts-fab-text" style="margin-left:74px"><div class="ts-fab-header"><h4><a href="http://twitter.com/chachovski">Stefan Chachovski</a></h4></div><!-- /.ts-fab-header --><div class="ts-fab-content" style="margin-bottom:0.5em"><p>Co-founder of Invoicebus. Huge lover of nature, science, and chocolate cherry cordials. He occasionally writes on this blog about Invoicebus' stuff. Hello him on <a href="http://twitter.com/chachovski">Twitter</a> or subscribe to his updates on <a href="http://facebook.com/cacovski">Facebook</a>.</p>
</div><div class="ts-fab-footer"> | <a href="http://twitter.com/chachovski">Twitter</a> | <a href="http://www.facebook.com/cacovski">Facebook</a> | </div><!-- /.ts-fab-footer --></div><!-- /.ts-fab-text --></div><!-- /.ts-fab-wrapper --><p>The post <a rel="nofollow" href="https://invoicebus.com/garage/how-to-protect-your-email-address-from-spam-crawlers/">How to Protect Your Email Address From Spam Crawlers</a> appeared first on <a rel="nofollow" href="https://invoicebus.com/garage">Garage</a>.</p>
]]></content:encoded>
			<wfw:commentRss>https://invoicebus.com/garage/how-to-protect-your-email-address-from-spam-crawlers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
