2015-08-22, 08:48 AM
Out of the box, MyBB 2.0 uses a "pretty" URL structure in which thread titles, user names, forum names, etc. are included in the URL. It also provides out of the box <meta> description tags and canonical links.
The link structure is as follows:
Where the slug is the content title, all lowercase with special characters removed and spaces replaced by "-".
This URL structure can easily be changed by administrators requiring only a single file edit. However, all URLs require the ID to be included.
Meta tags
By default, the meta description tag is included for all pages. The content of the description is derived from the page content. Some examples can be seen below:
Canonical links
Canonical links are included on every page to help search engines determine the base URL for a piece of content. This link is built using the defined URL structure shown above.
Providing feedback
Due to the nature of the link structuring, it is extremely easy to change. However, we will be keeping IDs in all URLs as looking up content by ID from a database is far faster than looking up using text. Additionally, generating a truly unique slug requires additional processing whenever saving content.
The link structure is as follows:
- Topic: /topic/9/me-thread
- User profile: /user/1/admin
- Forum: /forum/1/my-category
{TYPE}/{ID}/{SLUG}
Where the slug is the content title, all lowercase with special characters removed and spaces replaced by "-".
This URL structure can easily be changed by administrators requiring only a single file edit. However, all URLs require the ID to be included.
Meta tags
By default, the meta description tag is included for all pages. The content of the description is derived from the page content. Some examples can be seen below:
- Forum - the forum description is used as a meta description:
<meta name="description" content="MyBB 2.0 Test Install test category">
- Topic - the first post in the topic is used as the description, limited to the first 255 characters:
<meta name="description" content="The first official /me topic for MyBB 2.0. Paul H. gets the shivers">
Canonical links
Canonical links are included on every page to help search engines determine the base URL for a piece of content. This link is built using the defined URL structure shown above.
Providing feedback
Due to the nature of the link structuring, it is extremely easy to change. However, we will be keeping IDs in all URLs as looking up content by ID from a database is far faster than looking up using text. Additionally, generating a truly unique slug requires additional processing whenever saving content.