[pmwiki-users] Limiting search results (nofollow default)

Patrick R. Michaud pmichaud at pobox.com
Tue Sep 19 08:26:00 CDT 2006

Pico wrote:
> I took a look at the MicroSoft live.com search page and was surprised at 
> how different the search results were from google.com, in terms of 
> grabbing and promoting near the top of the list certain PmWiki pages, 
> such as PmWiki.PmWiki and Main.RecentChanges, as well as some 
> semi-personal pages that had never appeared on google.com
> One approach I am thinking of is to add %nofollow% to my pagelist 
> templates, to limit the opportunity for search rankings to be driven by 
> automatically generated pagelists.  (One problem: I'd be changing the 
> distributed PageListTemplates page and, as a result, creating issues for 
> future upgrades)

Somehow adding %nofollow% into pagelists seems like the wrong way to
do things -- i.e., it's solving the wrong problem.  Plus, I can't
imagine that it's the pagelists that are skewing the search rankings;
or, if it is, then that indicates a poorly written ranking algorithm.

> If I wanted to do more that just change my pagelist templates, could I 
> make a simple change in my config.php that would cause all links to use 
> nofollow by default and, if so, would there be a easy way to bypass that 
> to allow certain links to be followed?  

Sure, just change the formatting of links in the $LinkPageExistsFmt
variable to include rel='nofollow':

  $LinkPageExistsFmt = 
    "<a class='wikilink' rel='nofollow' href='\$LinkUrl'>\$LinkText</a>";

The variable for external links already has rel='nofollow' set by
default.  I don't know of an easy way to force rel='follow' after
this has been set, however.

> Actually, it would probably work 
> well if I changed the local config.php to add the new default and then 
> shut it off with a group configuration, such as main.php that allowed 
> the links in that group to be followed.  

Sure, this could be done.  But I still think that the pagelist
links aren't the cause of what you're observing at live.com .

What sort of search were you doing that gave surprising results?


More information about the pmwiki-users mailing list