Noindex

From MediaWiki.org
Jump to: navigation, search

Noindex can be used to prevent indexing of a page by search engines. Sample code would be:

$wgOut->setRobotPolicy('noindex,nofollow');

Or, if one wished to be more selective:

$wgOut->setIndexPolicy('noindex');

There are also __INDEX__ and __NOINDEX__ magic words. One can test whether they function for a given page using Title::canUseNoindex().

See also [edit]