Ajax software
Free javascripts
↑
Main Page
?
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.
Adding the
rel
=”
nofollow”
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.
In reality,
nofollow
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
example:
<a rel=”nofollow” href=”http://too.much.spam”>Bad site!</a>
It is also important to realize that too many links without
rel=”nofollow”
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
nofollow
feature.
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
nofollow
is
likely to cut down on spam. Either way, if
nofollow
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
rel=”nofollow”
attribute, but only to links that
are not in a predefined “white list.”
Creating and Using a Nofollow Library
1.
If you haven’t already done so by following the previous chapters, create a folder named
include
in your
seophp
folder. Then create a file named
nofollow.inc.php
in your
seophp/include
folder, and add this code to it:
<?php
// include config file
require_once ‘config.inc.php’;
// finds all the links in $str and processes them using fixLink()
function noFollowLinks($str)
180
Chapter 8: Black Hat SEO
c08.qxd:c08 10:59 180
Ajax software
Free javascripts
→