You aren’t providing free links to spammers.
Spammers are less motivated to spend time on your site.
Avoiding Comment Attacks Using Nofollow
Many black hat spammers will use the comment section of a blog or guestbook, or forums, to post spam
messages and links that promote their web sites.
attribute to a link will inform the search engine that that particular link is
not audited by your site, and should therefore not count as a trusted vote for the popularity of the linked
site. And though this strictly doesn’t prevent spam, it does remove a lot of the motivation that results in
a spammer targeting your site. The link will still work, but it will no longer be as desirable to a spammer
because it offers a diminished link equity value.
has far from eliminated comment and guestbook spamming. Unfortunately, it
does not eliminate the need for manual auditing and spam filtering. It is just a deterrent.
You can use the same technique when including links to sites that you don’t want to “vote.” Here’s an
<a rel=”nofollow” href=”http://too.much.spam”>Bad site!</a>
It is also important to realize that too many links without
may hurt your rankings if
they are linking to “bad neighborhoods” as well as damage your reputation and credibility. All major
search engines currently support this the
Automated scripts may still target your site, only because, frequently, the spamming is done in bulk,
and the spammer has not investigated your site specifically. In practice, however, using
likely to cut down on spam. Either way, if
is employed, the damage is mitigated as it can
only damage visitor perception, not search engine rankings, because the links will not be seen as votes
to a bad neighborhood by a search engine. Collectively, because most web sites will begin using this
feature, it will yield inferior results, and spammers will use such techniques less frequently.
In the exercise that follows you create a little PHP “nofollow library,” which employs a regular expres-
sion that alters all links in a text buffer by adding the
attribute, but only to links that
are not in a predefined “white list.”
Creating and Using a Nofollow Library
If you haven’t already done so by following the previous chapters, create a folder named
folder. Then create a file named
folder, and add this code to it:
// include config file
// finds all the links in $str and processes them using fixLink()
Chapter 8: Black Hat SEO
c08.qxd:c08 10:59 180