Thread Rating:
  • 2 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Canonical v1.0
License is attached inside extras folder by using this software you agree to the terms of that license.

Plugin Name: Canonical
Plugin Author: Jesse Labrocca
Plugin Website:
Plugin Version: 1.0
Plugin Mybb Compatibility: 1.4x
Plugin File Edits: None
Plugin File Uploads: 1
Plugin Description: This plugin will allow your site to adhere to the new rel=canonical standard for better SEO by adding the tag to headerinclude. Currently working only for forumsdisplay.php and showthread.php. (read below for more details)


1. Upload the file from the zip to your plugins directory.

2. Login to your admincp and ACTIVATE the plugin (Canonical) in the plugin manager.

3. Check your admincp setting under "Server and Optimization Options" and for the "Enable search engine friendly URLs?" either choose "Enabled" or "Disabled". It's best not to use "Automatic Detection".

Troubleshooting: If you don't see in the source code of your forumdisplay or showthread pages the rel=canonical tag in header then in admincp edit the "headerinclude" template and on the first line add {$canonical}. Double check source code (f5 refresh). This is also NOT compatible with any SEO plugin but is compatible with default mybb SEF URLs.

Testing: For easier testing I have an echo $link in the canonical.php file twice. You can uncomment them and you should see the displayed canonical URL on top of the page. Make sure to comment them again once you are done testing.

More about CANONICAL
Recently Google, MSN, and Yahoo! search engines created a new method for indexing urls. You can read some of that info here:

Currently Mybb creates many duplicate URLs. Even under their SEF the issue exists:
Examples at

This plugin would instead rel=canonical into cleaner URLs:

As you can see from the above example link 2 and 3 are the exact same content but Mybb would have multiple URLs all displaying that content.

I have in the extras folder a screenshot showing a handful of URLs inside my Google Webmaster Tools section. Take a peek. You can see the duplicate URLs that Google views:

With this plugin search engines will be given the url correctly as showthread.php?tid=1047 as the main URL to index.

This will also work with pages as this:
will get indexed correctly as this:

I suggest you do read up on the above blog posts from the search engines to learn more about what this plugin is meant to do.


Thank you.

Attached Files Thumbnail(s)

.zip (Size: 5.92 KB / Downloads: 378)
First in. Cheers mate. This is going to be a major plugin.
FTW Forum <-- Home of the DAMNED!
I have a weird thing that happens to my sigs. Its call moderation lol
Awesome work ... congrats Big Grin
Ha ha beat you Bey Brad lol. Installed perfect as expected. Not a fault with it from my forum anyway. Great work again Labrocca.
I can see loads of work went into this one. Thankyou again.
FTW Forum <-- Home of the DAMNED!
I have a weird thing that happens to my sigs. Its call moderation lol
Wow bro, seems like you've done a lot of work on it. I think vbseo does the same job for index page only.
Is there any way to use it with Lighttpd?!
I don't see why it won't work. It's just php.
(Mar 22, 2009, 05:46 PM)labrocca Wrote: I don't see why it won't work. It's just php.

Yes,i know.but the "Server and Optimization Options" is up to using Apache .htaccess file.right?
If you have mybb running this plugin will work one way or another.
Very nice, testing it right now Smile

Forum Jump:

Users browsing this thread: 1 Guest(s)