Stopping
Spam:
|
|
JavaScript methods (recommended) |
||||||||
|
|
|
|
|
|
||||
|
JavaScript You could add a <noscript> tag to the end of your code so those without JavaScript can still see an address, but I don't recommend this because almost everyone has JavaScript enabled, and because spambots are more likely to crack your <noscript> tag than the JavaScript code. But if you really want <noscript>, then do it like this: <NoScript>info<a>-[at]-BicycleAustin.com</NoScript>. The random <a> tag and the hyphens will help fool spambots. |
|
|
|
|
||||
|
JavaScript field |
<FORM> |
A, B2, C, D |
1a, 2, 3, 6j |
|||||
|
Javascript alert |
|
<A HREF="#" onclick="d='BicycleAustin.com'; u='info'; prompt('Copy address to clipboard',u+'@'+d); return false">Click to send us email</A> |
|
|
||||
|
JavaScript popup |
|
<A HREF="#" onclick="window.open('spampop.html','','width=300,height=200'); return false">Click to send us email</A> |
|
1a, 3j, 4j, 5j, 6j |
||||
|
Have user click a button to get to the page with the email addresses |
|
<FORM ACTION="addresses.html"> |
|
|
||||
|
Challenge-Response (recommended) |
||||||||
|
You just use regular mailto: links on your site. When someone sends you a message, SpamArrest sends them an autoresponse asking them to verify they're a real person by typing the letters in an image. Only real, confirmed messages are passed along to you, so this pretty much prevents spam by 100%. You can start off by putting your friends on a whitelist so they don't have to go through the verification process. The way it works is you give your login to SpamArrest, and they periodically download all your mail, and then you download the verified mail from them. The downsides of SpamArrest are that it's a little annoying for the people trying to mail you, and it's not free -- it runs $50/yr. Then again, my friend Michael Shackleford uses it and swears by it. Sign up at SpamArrest.com. |
|
|
||||||
|
Methods in which the email address isn't copyable (less user-friendly) |
||||||||
|
Spell out the address |
info-(at)-BicycleAustin.com. |
|
|
|
||||
|
Make an image of the @ sign |
BicycleAustin.com |
|
|
|
||||
|
Methods in which the email address isn't visible (less user-friendly) |
||||||||
|
Use a form for users to send mail
|
Send me a copy |
(Note #1: Some FormMail scripts require you to put the recipient's address in in a hidden field on your web page, defeating the whole point of using FormMail in the first place. You could write out the hidden field with JavaScript, but if you're doing that then you might as well just JavaScript your address to begin with and not use the form.) (Note #2: Rename your <formmail.pl> script to something else to prevent spammers from finding it by guessing the filename and then hijacking it to send out their spam. Diligent spammers can hijack even a renamed formmail script, so get a professsional to verify that your script is secure.) |
|
|
||||
|
PHP, Perl, ASP, or other server-side languages |
|
send us email</A> Source of
email.php: <?php See code for other languages. |
|
|
||||
|
Additional Advanced Method |
||||||||
|
Block all visitors other than known browsers; block visitors which request too many pages |
(1) Use mod_rewrite in your .htaccess file to block any user-agent that doesn't start with "Mozilla" or "Opera" and which isn't a major search engine bot. Here's a list of user-agent strings. (2) Do a double-reverse lookup on agents that claim to be a search engine bot (like Googlebot) to make sure they're not impersonating a valid bot. (3) Have a script check your logfiles for excessive page requests from an IP address every minute or every page load. (4) When you find violators from #2 or #3, ban their IP addresses in .htaccess. Lift that ban after a day or two because the spambot might have been using an ISP's IP that legitimate users also use. Caveats: You still have to use some other method above, too, to thwart bots that would steal a plain address before you could ban them. You will also likely ban some very small percentage of valid users accidentally. |
|
|
|||||
|
Obsolete methods that no longer fool most spambots |
||||||||
|
Encode the @ sign |
|
"mailto:info@BicycleAustin.info"> info&#64;BicycleAustin.info</A> |
|
|
||||
|
Encode the whole address |
|
|
|
|
||||
|
Block spambots by name with .htaccess |
|
|
|
|
||||
|
Pros |
Cons |
|
|
(A) Easy to implement (B1) Fools all spambots at present (B2) Fools most spambots at present. (C) Address is visible. (D) Address is copyable (E) Address is clickable.
|
(1a) Might not fool all
spambots. If spambots get wise to this, this trick will be
useless. (2) Address isn't visible, at least not initially. Users hate it when they can't see the address. (3) Address isn't
clickable, ever. (4) Address isn't copyable.
Forces webmail users to retype the address, or at least edit
it. (5) Relies on ability of
users to understand that they must replace "(at)" or the
graphic with a real "@" symbol. You can put instructions
about that in there, but then the page starts getting
cluttered. (6j) Doesn't work if the user turned JavaScript off. (7) Address itself must be shown rather than a send email type link. (8) Might have to make @ images in a variety of fonts, sizes, and colors. (9) Requires either knowledge of CGI programming, or that your webhost provides a canned FormMail script that doesn't require you to put your email address in a hidden Form field. (10) User gets no transcript of the message. You can overcome this by including an option to cc: the user, except most prewritten FormMail scripts don't support this. (11) Spambots can find the address that the form is sent to unless your CGI interface allows you to not put the send-to address in typical email format. (12) Requires user to go to a new page before seeing the email address(es). (13) Hard to implement. Doesn't work well if email address appears on every page (vs. on a "Contact Us" page). You will probably accidenally deny access to some legitimate users. (14) User receives an autoresponse and has to go to a website to verify they're not a spammer before the message gets delivered. It only takes a few clicks, but anyone who wants to email from your website will have to go through that hassle. |
SpamArrest is described in more detail above, but here's the technical explanation of how it works, especially since it's not explained well on their website: Starting over with a new address If the amount of spam you're getting is burdensome you may have little choice other than to start over with a new email address. Of course this is never convenient or fun. It's easier if your email provider provides Autoresponder service, so that anyone who sends mail to your old address automatically receives a message back telling them your new address. Don't worry, it's unlikely that spammers will pick up your new address from the autoresponder. Spammers send to thousands or millions of addresses at the same time and they get thousands of bounce messages since many of the addresses they sent to are outdated. Spammers don't waste their time going through the thousands of bounce messages to see if someone posted their new address with an autoresponder. Where spammers get their addresses Spammers get their addresses from many places, but these are probably the most common: Using multiple addresses An old trick is to have two addresses: a "real" address that you give only to family and close friends, and a "throwaway" address you use for everything else. If the throwaway address starts getting spam, you literally throw it away -- put an autoresponder on it directing readers to your new address, and start over with another address. Use plus-addressing Both Google support plus-addresses. That lets you create a new email address on the fly by using a + sign. For example, let's say your address is lisa@example.com. You can use lisa+[anything]@example.com and it will work automatically, without your setting up anything special. All mail will be delivered to lisa@example.com. Using catch-all addresses My favorite trick doesn't work so well any more. Since I have my domain name, I had set up my domain to accept any mail addressed to it -- e.g., [anything]@mydomain.com would all come to me. So I used a different address for everyone I did business with -- SierraClub@mydomain.com, Yahoo@mydomain.com, AceCasino@yourdomain.com, etc. -- it all came to me. Then if one of these businesses let spammers get my email address, I could just turn that individual email addresss off. Don't store customers' email addresses in the webspace! Spammers were able to get a logfile of my clients' customers' email addresses because I wasn't careful enough. I put the logfile in a directory that also had an index.html file, which should have prevented any bot from seeing the log.txt file inside that directory. I don't know how they did it, but they found it -- along with Google, Yahoo, and who knows who else. I have a lengthy post about the incident at WebmasterWorld.
Address to link to this section: http://WebsiteHelpers.com/spam/#whybad
Every time I hear someone say that I want to slap them.
Fighting spam is a big, big issue and I couldn't cover every single thing, but I hope this is enough to get you started. Good luck! |