Mix blatant bigotry with poor spelling. Add a dash of ALL CAPS. Top it off with a violent threat. And there you have it: A recipe for the worst of anonymous online comments.

Now a growing number of websites are reining in the Wild West of online commentary. Companies including Google and the Huffington Post are trying everything from deploying moderators to forcing people to use their real names in order to restore civil discourse.

The efforts put sites in a delicate position. User comments add a lively, fresh feel to videos, stories and music. And, of course, the longer visitors stay to read the posts, and the more they come back, the more a site can charge for advertising.

What websites don't want is the kind of off-putting nastiness that spewed forth under a recent CNN.com article about the Affordable Care Act.

"If it were up to me, you progressive libs destroying this country would be hanging from the gallows for treason. People are awakening though. If I were you, I'd be very afraid," wrote someone using the name JBlaze.

YouTube, which is owned by Google, caused a stir last month when it began requiring people to log into Google Plus to write a comment. Besides herding users to Google's unified network, the company says the move is designed to raise the level of discourse.

"If you post videos on your channel, you also have more tools to moderate welcome and unwelcome conversations," YouTube said in a blog post about the changes.

advertisement | advertise on newsday

Huffington Post is also clamping down on vicious comments. In addition to employing 40 human moderators who sift through readers' posts for racism, homophobia, hate speech and the like, the AOL-owned news site is also chipping away at anonymous commenting.

Previously, anyone could respond to an article posted on the site by creating an account, without tying it to an email address. This fall, HuffPo began requiring people to verify their identity by connecting their accounts to an email address, but that didn't appear to be enough and the site now also asks commenters to log in using a verified Facebook account.