Pages

Wednesday, March 27, 2013

How to design to avoid spam

Most Web hosting services provide an option to allow for unlimited email from that domain. This option is a great tool in managing spam. The key is to set up the mail so that anything incorrectly addressed to the domain is forwarded to your email address. Then, when you need to use your email address to register for a Web service, use an address like nameoftheservice@yourdomain.com. Since there wouldn't be an account for that address, it would automatically be routed to your standard email address. When you begin seeing email addressed to nameoftheservice@yourdomain.com you'll not only know that the email address has been nabbed up by those pesky marketers, but you'll also know where they got the address from. You can then set up a rule in your mail client to remove the mail before it ever begins to bloat your mailbox.


Be careful registering

Though you might not really think about security being a problem when you register a domain, you need to remember that the contact information, including your email address, is available to anyone who wants it. That's why you get emails with your domain name in the subject, offering you great deals on body modification, questionable pharmaceuticals, and solutions for your apparent loneliness. When you register a site, use the technique outlined above, or use a portable email address like MSN, Hotmail, or Yahoo. We like to set up an account using the domain name as the addressee, so for instance, the Hotmail account that we'd use to register the domain Element K would be elementk@hotmail.com. Of course, you'll occasionally need to visit the site and delete the mail, but that's an easy task that you can leave to do while you're chatting on the phone with your mom (and she'll appreciate the occasional phone call).

Keep your address off your Web site

We're constantly preaching to always include a contact page for your site where individuals can ask questions about the company or compliment you on your particular sense of style in designing the site. And that means that you have to include an address for the mail.

The problem is, search engines designed for spammers visit sites and automatically extract any email addresses they consider valid, whether the addresses are simply in mailto format or in Web forms. But you can outthink these rascally address harvesters. (After all, they're really nothing more than a few lines of code.) Just use a little code of your own. The script shown in Listing A will display the message Contact Us on the Web page but the harvesting software won't recognize the address, since it's combined from different variable names on the fly. (And, of course, you can download the code from the address listed above.) Just make the necessary changes to the script and include it in your GoLive Library or Dreamweaver snippets.

Listing A: The following code prevents robots from harvesting your email address from the Web page.

<script language=javascript>
<!--
var theuser = "yourname";
var thehost = "yourdomain.com";
var themessage = "Contact Us!";
document.write("<a href=" + "mail" + "to:" + theuser +
         "@" + thehost + ">" + themessage + "</a>")
//-->
</script>


Mailing with forms

If you use forms on your site for email, you'll need to modify the script shown in Listing A a bit. Just use the document.write function to form the input information, as shown in Listing B. Again, once you made the necessary changes, you can save this script for use within your Web authoring application.

Listing B: This script allows you to hide email addresses when you're using forms.

<script language=javascript>
<!--
var theuser = "yourname";
var thehost = "yourdomain.com";
var themessage = thesuer + "@" + the-host;
document.write("<input type=hidden name=email
          value=" +theuser + "@" + thehost" + ">";
document.write(theuser + "@" + the-host);
//-->
</script>



No comments:

Post a Comment

Note: Only a member of this blog may post a comment.