From: Charles C. <ch...@ru...> - 2005-01-31 09:43:21
|
On Thu, January 27, 2005 17:31, Charles Corrigan said: > I just looked at the access log for my site and noticed > that google was indexing it. And it was trying every > possible link from every page! > > Would it make sense to add a "rel='nofollow'" to links > such as "edit text" where it makes no sense for a robot > to follow? When I wrote that, it was already 7 days after Reini had started putting the nofollow attribute onto some of the links! My only excuse (hah!) is that CVS and then the lists had problems last week. Anyway, I took a look and found that the changes did not work for me - I did not spend any time trying to work out why. I just put a couple of changes in that worked in my testing. /lib/Theme.php - line 1184 - 4 lines in Button->Button() // Google honors this if (in_array(strtolower($text), array('edit','create','diff','pdf')) and !$request->_user->isAuthenticated()) $this->setAttr('rel', 'nofollow'); replaced with // Google honors this $this->setAttr('rel', 'nofollow'); - line 1210 - 4 lines in ImageButton->ImageButton() // Google honors this if (in_array(strtolower($text), array('edit','create','diff','pdf')) and !$GLOBALS['request']->_user->isAuthenticated()) $this->setAttr('rel', 'nofollow'); replaced with // Google honors this $this->setAttr('rel', 'nofollow'); OK, some justification is required. In my opinion 1 - it does not matter whether the user is authenticated or not, only that if the user is google or another search engine, we do not want them to follow these links 2 - while there are some of the action buttons that it would be good for google to follow (RecentChanges, BackLinks), most of them I would prefer it did not. The downside of my changes is that there will be an unconditional additional 15 characters per action link in the HTML sent to the client. regards, Charles |