Avoiding Spam Indexers

A big problem nowadays on the Web is the epidemic of spam, ranging from pop-under advertisements to email-based messages that try to sell you anything from weight-loss solutions to stock tips. However, something that a lot of people don’t realize is that just as Google crawls your website to add your content to its index, spam crawlers also look on your site for possible email addresses to send their junk to.

There are pretty reasonable business needs that dictate whether you need to display a contact email address on your website, and if you do, Smarty is there to help you with the {mailto} function.

This function allows you to encode an email address in such a way that spam crawlers cannot understand it as a real email address, but normal web browsers can.

Change the footer.tpl template file to the following:

<hr>
Copyright &copy; 2005 Smarty LLC<br />
Contact us at {mailto address=”[email protected]” subject=”Smarty LLC Contact” encode=”javascript”}

</body>
</html>

Reload any of the pages on our website, and you should now see a new section of text on the bottom of the screen, as shown:

Avoiding Spam Indexers

As you can see, it is simply displaying the email address to the browser. However, the real feature here is what is on the HTML code. The footer.tpl portion of HTML got changed to the following after Smarty processed it:

<hr>
Copyright &copy; 2005 Smarty LLC<br />
Contact us at <script type=”text/javascript” language=”javascript”>eval(unescape(‘%64%6f%63%75%6d%65%6e%74%2e%77%72%69%74%65%28%27%3c%61%20%68%72%65%66%3d%22%6d%61%69%6c%74%6f%3a%63%6f%6e%74%61%63%74%40%73%6d%61%72%74%79%6c%6c%63%2e%63%6f%6d%3f%73%75%62%6a%65%63%74%3d%53%6d%61%72%74%79%25%32%30%4c%4c%43%25%32%30%43%6f%6e%74%61%63%74%22%20%3e%63%6f%6e%74%61%63%74%40%73%6d%61%72%74%79%6c%6c%63%2e%63%6f%6d%3c%2f%61%3e%27%29%3b’))</script>

</body>
</html>

The above will work just fine with browsers that support JavaScript, and spam crawlers will not be able to differentiate this block of JavaScript code from the rest of the HTML.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.148.102.90