Manual:$wgNoFollowLinks

Details
If true, external URL links in wiki text will be given the  attribute as a hint to search engines that they should not be followed for ranking purposes as they are user-supplied and thus subject to spamming.