Preventing comment spam

If you're a blogger (or a blog reader), you're painfully familiar with people who try to raise their own websites' search engine...

If you're a blogger (or a blog reader), you're painfully familiar with people who try to raise their own websites' search engine rankings by submitting linked blog comments like "Visit my discount pharmaceuticals site." This is called comment spam, we don't like it either, and we've been testing a new tag that blocks it. From now on, when Google sees the attribute (rel="nofollow") on hyperlinks, those links won't get any credit when we rank websites in our search results. This isn't a negative vote for the site where the comment was posted; it's just a way to make sure that spammers get no benefit from abusing public areas like blog comments, trackbacks, and referrer lists.

We hope the web software community will quickly adopt this attribute and we're pleased that a number of blog software makers have already signed on:

Brad Fitzpatrick - LiveJournal
Dave Winer - Scripting News
Anil Dash - Six Apart
Steve Jenson - Blogger
Matt Mullenweg - WordPress
Stewart Butterfield - Flickr
Anthony Batt - Buzznet
David Czarnecki - blojsom
Rael Dornfest - Blosxom
Mike Torres - MSN Spaces

We've also discussed this issue with colleagues at our fellow search engines and would like to thank MSN Search and Yahoo! for supporting this initiative. Here are a few guidelines for anyone else who wants to join the cause.

Q: How does a link change?
A: Any link that a user can create on your site automatically gets a new "nofollow" attribute. So if a blog spammer previously added a comment like

Visit my <a href="http://www.example.com/">discount pharmaceuticals</a> site.

That comment would be transformed to

Visit my <a href="http://www.example.com/" rel="nofollow">discount pharmaceuticals</a> site.

Q: What types of links should get this attribute?
A: We encourage you to use the rel="nofollow" attribute anywhere that users can add links by themselves, including within comments, trackbacks, and referrer lists. Comment areas receive the most attention, but securing every location where someone can add a link is the way to keep spammers at bay.

Q: Should I put rel="nofollow" on the link to my comments page?
A: Probably not, because lots of interesting discussion can happen there. Also, if other people link to your comments page, a spider can follow that link and find any spam that's lurking on the comments page.

The best places to add this attribute are the actual links that other people can create. So on this page, for instance, only the links within comments and the link immediately after "Posted by:" would get the rel="nofollow" attribute.

Q: Do individual bloggers need to do anything?
A: Probably not. Updating the software that generates these pages will ensure that most bloggers get these changes automatically.

Q: Is this a blog-only change?
A: No. We think any piece of software that allows others to add links to an author's site (including guestbooks, visitor stats, or referrer lists) can use this attribute. We're working primarily with blog software makers for now because blogs are such a common target.

Got more questions? Email commentspam at google.com. As we spot more areas where spammers still abuse the Web, we'll contact the appropriate people in order to keep fighting comment spam.

Matt Cutts, Google Software Engineer
Jason Shellen, Blogger Program Manager

Update: The reaction to nofollow has really been quite positive, especially considering how diverse the web is. We're delighted to announce more support for nofollow:

Ross Rader - Blogware
John Panzer - AOL Journals
Kevin Marks - of Technorati also added a draft formal spec for nofollow.
Reini Urban - PhpWiki
David Gorman - ModBlog
Arnab Nandi - Drupal
James Tauber - Leonardo
Jeremie Bouillon - points out a GPL plugin for Textpattern
Simon Brown - Pebble
Ilkka Huotari - Netdoc
Shaun Inman - ShortStat
Eaden McKee - bBlog
Yariv Habot - backBlog
John Lyons - enetation
Steven Roussey - Network54
Will Yardley - Dreambook
[Update] Samuel Klingen Daams - Travellerspoint

We also wanted to add another question from a reader:

Q: Will Google recognize the 'nofollow' keyword when it's part of a space separated list? According to the HTML spec, the value of the 'rel' attribute is a space separated list of link types.
A: Absolutely. We'll practice the "be liberal in what you accept" philosophy, which means recognizing spaces, commas and, in fact, most punctuation. But we strongly recommend using spaces as separators to follow the specification.

Hot in Week

Popular

Archive

item