Improved SEO for MyBB Forum

Posted on March 17th, 2018 under Guides & Tutorials by Chris Lever

Do you use myBB forum script? I have a quick and easy way to improve your forum SEO. Out of the box myBB is a great way to create and build a community on your website. myBB is a free open source php/mysql forum script.

mybb seo

I have used myBB on a few websites over the years it’s a great way to build traffic and attract links. As with everything myBB has its pros and cons. The pros are its free and easy to setup, its extendable with plugins. The cons being its not all that great at SEO. Thats the reason I’m writing this blog post today, I’m going to demonstrate how you can improve SEO for myBB.

We’ll running through the following:

  • Improve HomePage Metas (title and description)
  • Improved Meta Titles and Meta Description for Threads
  • Canonical URLs for Threads
  • Structured Data (schema – JSON LD) – Threads
  • Open Graph – Threads
  • H1 Tags – Threads
  • Improved Meta Titles for Forums


We’ll be editing the following template files:

  • Index
  • Showthread
  • Forumdisplay


I’ll start with the forum homepage, have you noticed the meta title only shows your forum name? Have you also noticed there’s no meta description? Here’s a solution to improve it.

Login into admin ACP > Themes & Style > Templates


Homepage Metas

You are looking for the template set called Index Page Templates. In this example we will be modifying the default template, if you have a custom theme you can modify that.

Open the filename called Index (within Index Page Template)

Look for:


Replace with:

<title>About my Forum - {$mybb->settings['bbname']}</title>
       <meta name="description" content="Write a meaningful description here to describe what your forum community is about and why we should join." />

We have replaced the boring plain forum bbname title with a more meaningful title. Use keywords relating to your forum contents. Also make sure you write a meta description, no more that 230 characters.

Improved Meta Titles and Meta Description for threads

Moving on, by default myBB does not have meta descriptions, which personally I find a little odd, but hey-ho I’m sure the developers have their reasons. The meta titles are also little flaky, certainly room for improvement.

The title for threads is just that, the thread title. What I have done to improve the title is to add the bbname and page ID. That will go a long way to improving your forums SEO, and gone are the duplicate titles for page numbers as I have added the page ID to rectify that. For the meta description I have used the postpreview tag, it pulls the first sentence from the thread.

Open the filename called showthread (within Show Thread Template)

Look for:


Replace with:

<title>{$thread['subject']} - {$mybb->settings['bbname']} - Page {$page}</title>
 <meta name="description" content="{$thread['postpreview']} {$page}" />

Canonical URLs for Threads

Add the following snippet just below the newly modified title and description. Be sure to replace with your website’s domain name.

<link rel="canonical" href="{$_SERVER['REQUEST_URI']}">

Structured Data (Article Schema – JSON-LD) – threads

Moving on, and staying with the showthread file. I will now show you how to added structured data to threads. Add the following snippet of code just below the newly added canonical tag. Be sure to replace the image path with your website logo or whatever image you prefer. Lastly replace SiteName with your website or community name.

<script type="application/ld+json">
  "@context": "",
  "@type": "NewsArticle",
  "headline": "{$thread['subject']}",
  "datePublished": "<?=my_date($mybb->settings['dateformat'], $thread['dateline'])?>",
  "description": "{$thread['postpreview']}",
  "image": {
    "@type": "ImageObject",
    "height": "",
    "width": "",
    "url": "add image here"
  "author": "{$thread['username']}",
  "publisher": {
    "@type": "Organization",
    "logo": {
      "@type": "ImageObject",
      "url": "add image here"
    "name": "SiteName"
  "articleBody": ""

Open Graph (OG) – threads

Staying with the showthread file. We’re gonna add basic OpenGraph tags, they are especially useful for generating snippets of information for when somebody shares a forum thread link on social media giants such as Facebook and Twitter. You will need to replace with your domain name. You should also update the image with your website logo. You can also replace SiteName. Add the following just below the Schema Article markup.

<meta property="og:type" content="article">
<meta property="og:title" content="{$thread['subject']}">
<meta property="og:url" content="{$_SERVER['REQUEST_URI']}">
<meta property="og:image" content="">
<meta property="article:author" content="SiteName"> 

H1 Headings Tag for Threads

We are done with the head section, now I will show you how to add H1 headings to your thread pages. H1 headings will help to increase the organic search visibility (rankings) of your forum threads and posts. Staying with the showthread file.

Look for:

<td class="thead">

<div class="float_right">
<span class="smalltext"><strong><a href="javascript:void(0)" id="thread_modes">{$lang->thread_modes}</a>{$threadnoteslink}</strong></span>





Replace with:

<td class="thead">

<div class="float_right">
<span class="smalltext"><strong><a href="javascript:void(0)" id="thread_modes">{$lang->thread_modes}</a>{$threadnoteslink}</strong></span>






Please note, you may need to style the H1 heading tags to match the overall style and feel of your myBB community forums.

Improved Meta Titles for forums

Last but certainly not least, I will show you how to improve SEO for the forum pages. Very similar technique as the threads, we’re improving the meta title. This is to help Google and other search engines to better understand the forum pages and their contents. We’re also stopping and duplicate titles.

Open the filename called forumdisplay (within Forum Display Template)

Look for:

<title>{$mybb->settings['bbname']} - {$foruminfo['name']} </title>

Replace with:

<title>{$foruminfo['name']} - {$mybb->settings['bbname']} - Page {$page}</title> 

Final Thoughts

Firstly let me start with, I would not recommend you implement the above recommendations straight to your live community forums. Test them out on a fresh installation of myBB or on a backup copy of forums. They should all work just fine, but I would rather warn you first. I have done the above tweaks on a fresh installation of myBB and popular forums I run called Gigarocket.

When you do action the tweaks to your live website, be sure to use the ‘Fetch as Google’ and requesting indexing for all pages in Google Search Console. You should start to see an uplift in traffic after a couple of weeks.

Theres other tweaks I could write to improve SEO, but in the interest of time. I will save those for another day. Feel free to comment below, I will happily answer any questions. If you found this tutorial please link to it or share across your favourite social meida channels.

Spread the love

© 2011 - 2018 - Sitebee Search Consultancy