Google SEO

Search Engine Optimization as described in Google's SEO Starter Guide.
Version: 1.8.4
Autor: frostschutz
Deutsche Übersetzung: noch nicht übersetzt
Hochgeladen: 20.09.2016
Letzte Aktualisierung: 09.08.2020
Support: (99 Beiträge)
Kompatibilität: MyBB 1.8.x
Bisherige Downloads: 265

The development of this plugin started when Google released a document called"Google's Search Engine Optimization starter guide" in November 2008.After a long public beta phase the plugin finally reached stable status inMarch 2009. A new, revised edition for MyBB 1.6.4 and newer was releasedin August 2011.

The goal of this plugin is to implement Search Engine Optimization (SEO)in MyBB according to the guidelines presented in Google's SEO starter guide to make MyBB more friendly to both users and search engines.

Google SEO is free open source software (LGPL). This means that you candownload the plugin for free, modify it to your liking, and you do not haveto put any copyright or backlinks on your page.


The plugin currently supports the following features. All features can beselectively disabled / enabled. For more detailed information, refer tothe Configuration section below.
  • Google SEO 404:
    • Error pages return HTTP 404 Not Found (and others) instead of 200 OK
    • Custom 404 error pages
    • Google's 404 widget
  • Google SEO Meta:
    • description meta tags for forums / threads / etc.
    • specify canonical pages
    • nofollow links
  • Google SEO Redirect:
    • redirect old URLs to new URLs (or vice versa)
    • avoid URL breakage and double content
  • Google SEO Sitemap:
    • dynamic generation of XML Sitemaps
    • search engines find your content without crawling
  • Google SEO URL:
    • Keyword URLs (e.g. Thread-Some-Subject instead of showthread.php?tid=12345)
    • UTF-8 in URLs is supported
    • Customizable URL styles

In order to install this plugin, first check that you meet therequirements, then upload the plugin's files (usually the entireinc/ folder). The list of requirements and files with additionalinstructions is listed below. Once all files are present, you canuse the Install/Activate controls in the Admin CP and configure it.Once installed, the plugin will show a status which may containfurther instructions.


In order to use this plugin, you must meet these requirements:
  • MyBB 1.6.4 (older versions of MyBB need the Google SEO Legacy plugin)
  • PluginLibrary 11
  • PHP 5.1.0
  • Apache (alternative webservers may work but are not supported)
  • MySQL (alternative databases are not supported at this time)

Some features of this plugin also require changes to core files.The changes can be applied and reverted in the Admin CP.

Upload language files

This plugin uses the following language files. Please upload them all.
  • inc/languages/english/admin/googleseo_plugin.lang.php
  • inc/languages/english/admin/googleseo_settings.lang.php
  • inc/languages/english/googleseo.lang.php


If your board uses languages other than English, please uploadanother copy of the language files for each language, i.e.into every inc/languages/*/ folder.

Language Packs

Language Packs for this plugin may be available on the MyBB Mods site,but there is no guarantee they will be up to date. This plugin has veryfew (less than ten) language strings that will be used outside ofthe Admin CP. You will find them in googleseo.lang.php. You can eithertranslate them yourself or leave them as is.

Upload plugin files

This plugin uses the following plugin files. Please upload them all.
  • inc/plugins/google_seo.html (the documentation you are reading)
  • inc/plugins/google_seo.php
  • inc/plugins/google_seo/404.php
  • inc/plugins/google_seo/meta.php
  • inc/plugins/google_seo/plugin.php
  • inc/plugins/google_seo/redirect.php
  • inc/plugins/google_seo/sitemap.php
  • inc/plugins/google_seo/url.php
Enable the plugin

Once all files are uploaded to the correct location, go to yourAdmin CP -> Plugins page. The Google SEO Plugin should show up inthe plugin list. Click Install & Activate to install the plugin.The plugin will show a status information with further instructionsfor you to follow. By default, all features of the plugins will bedisabled at first and can be enabled on the Admin CP -> Configuration page.


The Google SEO plugin can be updated by uploading the new files(as described in the Installing section above). Once all the new filesare in place, go to your Admin CP -> Plugins page and deactivatethe plugin, then activate it again. Further instructions may begiven in the plugin status. New settings might be availablein the Admin CP -> Configuration page.


If you are updating from Google SEO Legacy or Google SEO 1.1.13 or older,you have to undo any modifications made to inc/functions.php prior toupdating the plugin. Please obtain the original, unmodified inc/functions.phpdirectly from the MyBB downloads page or MyBB Wiki.

If you were using the Patches plugin to modify inc/functions.php,please deactivate / remove the Google SEO related Patches.


If you want to redirect SEO URLs back to MyBB stock URLs,do not uninstall but refer to the Redirection section below.

To uninstall the plugin, go to your Admin CP -> Plugins page andclick Uninstall. Then remove the plugin's files (listed in the Installingsection above). Also remove all other modifications you may have madeto additional files such as htaccess.


Uninstalling Google SEO removes its URL database. If you wereusing SEO URLs, those URLs will no longer work and old URLswon't be redirected even if you reinstall the plugin.

Plugin Status

When installed and activated, Google SEO will display a plugin statuson the Admin CP -> Plugins page. The status gives an overview of whichof the plugin's features are enabled or disabled. It will also warn youabout known issues and tell you when you have to make changes, suchas adding Rewrite Rules or applying or reverting changes to core files.


Check the plugin status regularly (especially when changing settings)to see if everything is the way you want it to be.

Configuration & Settings

Google SEO has lots of settings, organized into several settinggroups. If you go to your Admin CP -> Configuration page, andscroll down, you should see the Google SEO Setting groups.The following sections will describe the settings available ineach group. Please also read the descriptions of the settingsthemselves directly in the Admin CP.

Google SEO

This is the main setting group of the plugin. In here you can decidewhether or not to enable the various feature sections of the plugin.Disabling a setting here also disables all other settings of thatfeature, so for example if you disable URL, none of the settings inthe Google SEO URL setting group below will have any effect.

Settings in this group:
  • Enable Google SEO 404
  • Enable Google SEO Meta
  • Enable Google SEO Redirect
  • Enable Google SEO Sitemap
  • Enable Google SEO URL

Many of the settings below are intended for advanced users only.If you do not understand what a setting does, stick to therecommended default value.

Google SEO 404

Settings in this group:
  • 404 widget
  • Show 404 errors in Who's Online
  • Customize HTTP status codes
  • Debug 404 error labels
Google SEO Meta

Settings in this group:
  • Meta description
  • Canonical Page
  • Meta for Archive Mode
  • Provide page number for forum and thread titles
  • Nofollow links
  • Noindex forums
Page number in forum and thread titles

By default, MyBB does not include a page number in the title.This causes Google to complain about lots of duplicate titletags for forums and threads which have many pages.

Google SEO Meta provides a variable which you can includeinto your forumdisplay and showthread templates. Howeverif you want this, you have to edit these templates manually.

Example <title> tag in the showthread template:
The variable will only be set for pages > 1, so this changewould lead to page titles like "Subject" for page 1 and"Subject - Page 2" for page 2.

Google SEO Redirect

Settings in this group:
  • Permission Checks
  • Redirect Post Links
  • LiteSpeed Bug workaround
  • Nginx Bug workaround
  • Debug Redirect
Redirect Loops

If you experience redirect loops (redirects that never end)please enable the Debug Redirect feature and send me thedebug output. Please note that the debug output may containconfidential information (such as login cookies), so pleasedon't post it in public, but email / PM me directly.

If you are using an alternative webserver, you can alsogive the LiteSpeed / Nginx workaround settings a try (evenif you're not using those webservers) and see if they help.

Otherwise, disable Redirect until a solution can be found.

Redirecting SEO URLs back to MyBB stock URLs

Google SEO does not force you to keep using its URLs. If youwant to go back to stock URLs, you can do so. Basically youhave two options to achieve a SEO URL -> Stock URL redirection:
  • Empty the SEO URL scheme for a particular URL typeThis is useful if for example you want to go back to stockURLs for user profiles only, but not for forums and threads.Revert changes to core filesThis way the Google SEO URL module will be in inactive state.

Do not disable Google SEO URL or Redirect, and do not removethe Rewrite Rules from your .htaccess. All of these componentsare required to keep old keyword URLs and subsequent redirectworking.

Google SEO Sitemap

Settings in this group:
  • Sitemap URL scheme
  • Forums
  • Threads
  • Users
  • Announcements
  • Calendars
  • Events
  • Additional Pages
  • Sitemap Pagination
Sitemap Generation

The sitemap standard (or that what Google, Yahoo, Ask etc. are using)is described here:

The sitemap-index.xml is an Sitemap index file as described there.It links to the actual sitemap files (sitemap-threads.xml?page=1).

Google SEO Sitemaps are created dynamically. When you tell Google aboutyour XML Sitemap (in Google Webmaster Tools, or by specifying it inyour robots.txt file) it will download the index, and then browse throughthe sitemaps listed in this index. So Google goes through your Sitemappage by page similar to how a user goes through your forums page by page.

It's split into pages because creating a sitemap for tens of thousands ofthreads, users and forums all at once would cause too much load.Also, sitemaps have a limitation of 50000 items per sitemap.

The Sitemap is created dynamically in order to give Google and othersearch engines the current up to date status of your forum whenever itchooses to access your sitemap. This way Google gets up to date sitemapsas early as possible which leads to google accessing your new content itfound via the sitemap as early as possible which leads to your new contentgetting indexed by Google as early as possible.

Please note that the Sitemap displays only forums and threads thatthe current user can actually read. So if you see private threads inyour sitemap, it may be because you're currently logged in as admin,and does not mean that Google will see those threads too.

Submit Sitemap to Search Engines

For the Sitemap to be of any use, you have to submit it to Search Engines.You can automate this process by adding a Sitemap directive to yourrobots.txt (example robots.txt included in the Google SEO package).By default your Sitemap will be called sitemap-index.xml.

Google SEO URL

Settings in this group:
  • Query Limit
  • Evaluation Mode
  • Use MyBB's Cache system for SEO URLs
  • Punctuation characters
  • URL separator
  • URL uniquifier
  • URL uniquifier enforcer
  • Character Translation
  • lowercase words
  • URL length soft limit
  • URL length hard limit
  • Handle Post Links
  • Handle multipage links
  • Forum URL scheme
  • Thread URL scheme
  • Thread Prefixes
  • Announcement URL scheme
  • User URL scheme
  • Calendar URL scheme
  • Event URL scheme
  • Include parent forum in forum URLs?
  • Include parent forum in thread URLs?
  • Include parent forum in announcement URLs?
  • Include parent calendar in event URLs?
Evaluation Mode

Google SEO URL has two possible modes of operation.

In Full Mode (Default), every time a SEO URL is requested, it willbe obtained and returned immediately. In worst case (if the URL isnot cached), this will require a database query. When querying URLsfrom the database, Google SEO tries to query as many URLs as possiblein one go, but it can't always predict which URLs will be requiredfor the rest of the page, especially when other plugins create linkstoo.

In Lazy Mode, Google SEO returns a place holder instead of theSEO URL. Just before the page is sent to the user, it will thenproceed to replace all placeholders with the SEO URL. This way,all URLs that are on the page can be handled in a single query.

The downside of Lazy Mode is that there's no guarantee thata requested URL will be used in the output. It might just aswell become part of some notification mail or used for otherpurposes. Since this is most likely to happen during POSTrequests, Lazy Mode will only work for GET requests andfall back to Full Mode for POST requests.

If you feel that Google SEO uses too many queries on your board,or if your board is just very large and active, or if yourdatabase just happens to be very slow, Lazy Mode mightbe for you. Otherwise stick to Full Mode as it is much morereliable.


The Google SEO URL Uniquifier is applied to URLs that would otherwisenot be unique (and thus result in threads that are not accessible).Collision testing (for example for two threads with the same title)is done only once, therefore the uniquifier must result in a trulyunique URL that can not possibly collide with anything else.

A good uniquifier needs to fulfill these two criteria:
[*]contain the items unique {id}
[*]contain punctuation that cannot occur in non-uniquified URLs

Early versions of Google SEO used {url}-{id} as uniquifier andtherefore did not fulfill criteria 2. This could lead to collisionsin rare cases, for example:

ID: 1, Title: Unique,URL: Thread-UniqueID: 2, Title: Unique 3, URL: Thread-Unique-3ID: 3, Title: Unique,URL: Thread-Unique-3 (same as Thread 2)


Thread 3 collides with Thread 1 (both are called Unique), so theuniquifier is applied. This results in Unique-3. However, therealready happens to be a thread called Unique-3. Doesn't work.

With the new uniquifier {url}{separator}{separator}{id},the uniquified URL will be Thread-Unique--3. Because the id isalready unique, and other URLs can't contain -- (title punctuationis reduced to one single separator, not two), that makes the URLas a whole unique.

If you use a custom uniquifier, make sure it fulfills the twocriteria listed above. Be aware that special punctuation characterslike :@/?& or space can break your URLs.

Character Translation

Please note that translation of characters is not required (browsersand Google handle them just fine), and it causes additional CPU cost.

You can do character translation in URLs if you so desire. In thetextbox of the character translation setting, specify one characterper line and its replacement, separated by =.

For example the following would replace German umlauts with theirmost commonly used ASCII counterparts:

Ä = Ae
Ö = Oe
Ü = Ue
ä = ae
ö = oe
ü = ue
ß = ss


With this character translation setting, Thread-Übergrößenträgerwould appear as Thread-Uebergroessentraeger instead.


Google SEO Legacy used a separate translate.php file instead.This file is not used anymore. The translations have to bespecified in the setting.

URL Schemes

Google SEO uses a simple, static URL scheme by default (Forum-Name,Thread-Name, etc.). This is recommended because it tells users and searchengines exactly what to expect behind an URL. It is possible to customizethe URL scheme with various settings. However, not every scheme willactually work. When customizing URL schemes, you have to be aware of thelimitations of both this plugin and MyBB.

Avoid Scheme Conflicts

Google SEO URL relies on the webserver to rewrite the URLs to the correctfile. Thread-Subject is rewritten to showthread.php, Forum-Name toforumdisplay.php, and so on. For those rewrites to work, every URL musthave something in it that identifies it as being of a particular type.

For this reason it's not possible to remove Thread- or Forum- becausethen the rewrite rules would confuse Subject for a forum URL and Namewith a thread URL. When you have a conflict of any kind in your URL scheme, the URLs will stop working and you will also lose the abilityto redirect these URLs later.


If a Rewrite Rule matches more than one type of URL, you have a conflictand your URLs will stop working either altogether or at least partially.

The default scheme avoids conflicts by using prefixes: Thread-{url},Forum-{url}, Announcement-{url}, etc. This way a thread URL can neverstart with Forum- and a forum URL can never start with Thread-, sothere are no conflicts possible.

You can change those prefixes to something else as long as you keepsome kind of unique prefix, for example t-{url} instead of Thread-{url}.

You can also use postfixes, such as {url}-Thread and {url}-Forum.However you can not mix prefix and postfix, as otherwise Thread-Forumcould be either a thread called forum, or a forum called thread.

On the other hand, a postfix such as {url}.thread would work evenif the other URLs use prefixes, because by default the dot charactercan not occur in the {url} itself.

Dynamic SEO URLs

If your webserver does not support mod_rewrite, you can put the keywordURL in the dynamic part. The default dynamic URL scheme would be like so:

Announcements: announcements.php?{url}


Please note that {url} must be a stand alone parameter. The following will NOT work:



The only exception to that rule are the parameter names that Google SEOuses internally for rewrites:


Virtual Directory Structure

Google SEO supports including the parent forum name in thread URL, and allows the use of the directory separator /. With this,in theory, you could build a virtual directory structure URL schemealong the lines of f-My-Category/f-My-Forum/t-Subject.

However, due to the issues involved with Virtual Directory Structure,this feature will never be directly supported in any way. You can do it if you absolutely want to but you will have to adapt your own rewrite rules for it (the standard rewrite rules do not look for / in {url}). The rewrite rules suggested in the Plugin Status won't work.

Doing this is NOT recommended for several reasons. First of all itmakes URLs more expensive and serves nothing but make your URLslonger than they need to be.

MyBB uses relative links everywhere. Introducing a directory structure,virtual or not, breaks those links. Some of these issues can be workedaround, but there's no guarantee that it will work with other thingssuch as JavaScript.

To work around this issue, add a base tag to your headerinclude template:

<base href="{$settings['bburl']}/" />


Here's an example for a Virtual Directory Structure URL scheme:

Forum:         f-{url}/
Thread:        f-{url}
Announcements: f-{url}
Users:         u-{url}/
Calendars:     c-{url}/
Events:        c-{url}
Parent Forum:  {parent}/f-{url}
Parent Thread: {parent}/t-{url}
Parent Announcement: {parent}/a-{url}
Parent Event:  {parent}/e-{url}


And the Rewrite Rules to go with it:

# Google SEO URL Forums:
RewriteRule ^f\-([^./]+)/?$ forumdisplay.php?google_seo_forum= [L,QSA,NC]
RewriteRule ^f\-([^.]+)/f-([^./]+)/?$ forumdisplay.php?google_seo_forum=/f- [L,QSA,NC]
# Google SEO URL Threads:
RewriteRule ^f\-([^.]+)/t-([^./]+)$ showthread.php?google_seo_thread=/t- [L,QSA,NC]
# Google SEO URL Announcements:
RewriteRule ^f\-([^.]+)/a-([^./]+)$ announcements.php?google_seo_announcement=/a- [L,QSA,NC]
# Google SEO URL Users:
RewriteRule ^u\-([^./]+)/?$ member.php?action=profile&google_seo_user= [L,QSA,NC]
# Google SEO URL Calendars:
RewriteRule ^c\-([^./]+)/?$ calendar.php?google_seo_calendar= [L,QSA,NC]
# Google SEO URL Events:
RewriteRule ^c\-([^./]+)/e-([^./]+)$ calendar.php?action=event&google_seo_event=/e- [L,QSA,NC]

Combined Styles

It is possible to combine the various URL scheme styles to some degree. You can take the standard URL style Thread-{url}, and put the {url}in the dynamic part instead using Thread?{url}. To make this work youneed a rewrite for Thread -> showthread.php.

With the {url} in the dynamic part of the URL, you can proceed toincluding parent forums in thread URLs, even using directory separators. Since / in the dynamic part of the URL is not seen as a real directory,you will avoid most of the pitfalls involved with the Virtual Directory Structure.

Here's an example for a combined URL scheme:

Forum:         Forum?{url}
Thread:        Thread?{url}
Announcements: Announcement?{url}
Users:         User?{url}/
Calendars:     Calendar?{url}/
Events:        Event?{url}
Parent Forum:  {parent}/{url}
Parent Thread: {parent}/{url}
Parent Announcement: {parent}/{url}
Parent Event:  {parent}/{url}


The end result would be an URL like Thread?Category/Forum/Subject. Even so it's not recommended because the URL can just get too long.

SEO URLs do not work

If the SEO URLs do not appear (links are not changed), then you have eithernot enabled the URL settings properly, or you did not apply the necessarychanges to core files. Check your Plugin Status.

If the SEO URLs appear but give you errors like thread not found, threaddoes not exist, etc., then your Rewrite Rules do not work for some reason. Check that you have edited the .htaccess (not htaccess.txt!) correctly. Some hosts need a RewriteBase, others do not. If you are using a customSEO URL Scheme, make sure this scheme does not have any conflicts.
There is no sitemap.xml file

Google SEO's Sitemap is generated dynamically every time it is accessed.This means there is no file for it, similar to how there is no file fora specific thread. Instead of looking for a file on FTP, use HTTP.By default the URL to your sitemap will be yoursite/sitemap-index.xml
Users show up as seeing error pages in Who's Online

This usually happens when you have a missing image or CSS or JS filein your forum. The user visits a thread or forum, the browser tries to load the missing image, and the resulting 404 error overrides thelocation in the online list.

The Google SEO 404 Who's Online setting has an option to include theURI in the online status. If you enable this and then hover over theerror page links in Who's Online, you should be able to see whichpage / URL caused the error and fix it.

If you need further assistance, the official release thread for this plugin can be found in the MyBB Community - Plugin Releases forum.

Quelle: Google SEO bei

Ähnliche Erweiterungen

Google SEO 1.6.8 von frostschutz für MyBB 1.6.x
Search Engine Optimization as described in Google's SEO starter guide.

Google SEO Legacy 1.4.1 von frostschutz für MyBB 1.4.x
Google Search Engine Optimization for old MyBB 1.4 / 1.6.3

Facebook, Google, Twitter, SEO Metatags
Facebook, Google, Twitter, SEO Metatags 1.0 von Skyon Archer für MyBB 1.8.x
Gain the exposure your forum deserves with Social and SEO meta tags

Google SEO (Updated for PHP 8) 1.8.6 von Laird für MyBB 1.8.x
Updates frostschutz's original Google SEO plugin for compatibility with PHP 8

Google BBCode von Dennis Tsang für MyBB 1.0x / 1.1x
This plugin allows the use of [google]searchtext[/google], which produces a link to the corresponding Google web search.MyBB Version: 1.0 PR2 and...