Movable Type Documentation

Back to docs index

Chapter Nofollow

In this section:


The nofollow plugin is intended to help search engines understand which portions of your page are written by you and which are written by other people. The important element of this content is the hyperlink.

Many search engines use links between sites to understand how they relate. Comment/TrackBack spammers looking for higher placement in search engine rankings seek to exploit this heuristic in order to make their sites more relevant by linking to them from blogs.

By marking which links are part of your site versus part of third-party submissions, search engines can more accurately reflect related and relevant pages.

Automatic marking of comments/TrackBacks

The Nofollow plugin overrides three tags:

  • <$MTCommentAuthorLink$>
  • <$MTCommentBody$>
  • <MTPings>

In each case, Nofollow will intercept the content produced by these tags and alter any hyperlinks it finds, adding a "nofollow" relation ("rel") attribute to them. For example, if the CommentAuthorLink looks like:

<a href="http://www.example.com">Anonymous Coward</a>

The plugin would modify it to look like:

<a href="http://www.example.com" rel="nofollow">Anonymous Coward</a>

This is no way affects the presentation or functionality of the link on the page. It only informs search engines that the link was not created by you or is in a section of the page where third-party content is allowed.

In the event that a hyperlink already has a "rel" attribute, the "nofollow" relation is added to the front of the list like so:

<a href="http://www.example.com" rel="commenter">Anonymous Coward</a>

Changes to this:

<a href="http://www.example.com" rel="nofollow commenter">Anonymous Coward</a>

Exceptions for trusted commenters

Often, commenters you trust will link to good things in your comments which are very relevant to the topic at hand. In this case, you may want to direct the Nofollow plugin to skip submissions from these users in appliying rel="nofollow".

You can find this option in the Nofollow plugin settings on the System Overview Plugins listing screen. Once checked, any comments from authenticated and trusted commenters will not have nofollow applied.

Applying Nofollow to other weblog content

You can also apply the same effect to any links output by a Movable Type template tag or to all links within a container tag by using an attribute that the Nofollow plugin provides: nofollowfy.

For example:

<$MTBlogURL nofollowfy="1"$>

<MTEntries nofollowfy="1">
    <$MTEntryPermalink$>
</MTEntries>

In this case, rel="nofollow" would be applied to the blog URL and the entry permalinks that are printed out by the MTEntries block.

Applying Nofollow to arbitrary sections of a page

What about if you display your referrers or any other third-party contributed content that isn't output by a Movable Type template tag? How can you mark all of those links as foreign? Is there a way to just apply nofollow to a section of the page? Unfortunately, at this time, there is no generic container tag provided with Movable Type,

However, there is a hack that you can employ to get the same effect: Simply wrap that content in any suitable Movable Type container tag. So for example:

 <MTEntries lastn="1"nofollowfy="1">
    INSERT REFERRERS HERE
</MTEntries>

That executes the MTEntries loop only one time, applying the nofollow treatment but without using any of the entry data. An ingenious little hack, but a hack nonetheless. In a future release, we intend to make this easier.

Six Apart
Makers of weblog software and services for individuals, organizations and businesses.
This website is powered by Movable Type.