Great Drupal Modules: CAPTCHA - dummies

By Lynn Beighley, Seamus Bellamy

If you plan on rocking a Drupal site with an active forum or open account registrations, you will want to download the CAPTCHA module sooner rather than later. CAPTCHA (Completely Automatic Public Turing Test to Tell Computers and Humans Apart) provides a random question to site visitors that they must answer to prove they’re humans. CAPTCHA questions come in three basic forms:

  • A small graphic image that contains a printed word. The word in the image has to be typed into a form before a user can complete some action on a site.

  • A basic math question; for example, your visitor has to type in the answer to 10 + 8.

  • A string of text about which the visitor is asked a question; for example, “What is the first word in the phrase ofomom isulul iki udev uquse?”

Using CAPTCHA keeps spammers from being able to use programs to spam your site with lots of fake comments that are actually advertisements for prescription drugs, online casinos, or other questionable services.

While using CAPTCHA is a good idea, it doesn’t stop humans from posting spam. It only prevents automated spamming — those obnoxious programs that locate Drupal sites and root through them looking for places to add spammy comments.

You should moderate all comments in addition to using the CAPTCHA module. This may seem like overkill, but CAPTCHA limits the amount of spam you have to wade through so you have a manageable number of comments to moderate. Trust us, the legitimate users of your site will thank you for your efforts.

After you have uploaded and activated the module, you can configure where CAPTCHA questions appear in your site by looking to your Dashboard menu bar and choosing Configuration→People→CAPTCHA.


You will see a list of form types on your site and a drop-down list that allows you to select which of the three CAPTCHA types — text, image, or math — that must be answered before a form can be successfully submitted.

The Image CAPTCHA tab gives you some options to control the image CAPTCHA. You can specify font size, which font to use, what characters should be used, and what colors to use. The Distortion and Noise section lets you control the appearance of the text by adding noise and distorting the letters. If you do distort the text in your image CAPTCHA, make sure you test it a few times to ensure that it’s still readable.

Hacker techniques grow increasingly sophisticated all the time. Image CAPTCHAS work best when they are a little difficult to read. Optical character recognition programs, the same algorithms used to allow scanned documents to be output as text, can easily scan CAPTCHA images and extract the text, so adding a bit of noise or distortion can help foil them.

The Text CAPTCHA tab allows you to create and use your own phrase for visitors to answer rather than the random gibberish it produces.