Thread Rating:
  • 5 Vote(s) - 4.2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
URL structure, meta tags and canonicals
#1
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:
  • Topic: /topic/9/me-thread
  • User profile: /user/1/admin
  • Forum: /forum/1/my-category
As you can see, the general structure follows the pattern of:

{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.
Reply
#2
(08-22-2015, 08:48 AM)Euan T Wrote: Canonical links
We should consider adding it to 1.8 also.
Why pages like http://community.mybb.com/thread-175652-...pid1176516 have no canonical url? Or -lastpost.html
Also, archive can really screw you google results without canonical, even if you remove all links to it. Archive pages have no hooks, I had to hardcore <link rel="canonical" href="<?php echo $fullurl ?>" /> to functions_archive.php

Just saying. Cannonicals are not hard to implement and are important for forum software where there are a lot of different links to the same content.

Great that v2 will have it.
Reply
#3
(08-22-2015, 08:48 AM)Euan T Wrote: The link structure is as follows:
  • Topic: /topic/9/me-thread
  • User profile: /user/1/admin
  • Forum: /forum/1/my-category

What happens if you rename a topic, a user or a forum - will the URL change?
Reply
#4
it's possible use default structure url of mybb 1.8?
i not want use this type of structure...
Reply
#5
(11-07-2015, 12:09 PM)Amaryllion Wrote:
(08-22-2015, 08:48 AM)Euan T Wrote: The link structure is as follows:
  • Topic: /topic/9/me-thread
  • User profile: /user/1/admin
  • Forum: /forum/1/my-category

What happens if you rename a topic, a user or a forum - will the URL change?
Yes, but the old URL will perform a 301 redirect. The ID will stay the same.
(11-07-2015, 01:25 PM)martec Wrote: it's possible use default structure url of mybb 1.8?
i not want use this type of structure...

Yes, you'll need to simply change the main routes.php file, though I'm not sure why you wouldn't want to use the new structure, which makes it much more understandable for human users.
Reply
#6
(11-07-2015, 06:08 PM)Euan T Wrote: Yes, you'll need to simply change the main routes.php file, though I'm not sure why you wouldn't want to use the new structure, which makes it much more understandable for human users.

i already has index thread etc (like https://forum.minnasuki.com/thread-216.html )... i not want need change one by one...
Reply
#7
(11-07-2015, 06:12 PM)martec Wrote:
(11-07-2015, 06:08 PM)Euan T Wrote: Yes, you'll need to simply change the main routes.php file, though I'm not sure why you wouldn't want to use the new structure, which makes it much more understandable for human users.

i already has index thread etc (like https://forum.minnasuki.com/thread-216.html )... i not want need change one by one...

Old URLs will be redirected, so Google will pick up the new URLs and the old URLs will still work. So long as you use a core MyBB URL structure now, they'll all be redirected and Google won't penalise you Smile
Reply
#8
(11-07-2015, 06:14 PM)Euan T Wrote: Old URLs will be redirected, so Google will pick up the new URLs and the old URLs will still work. So long as you use a core MyBB URL structure now, they'll all be redirected and Google won't penalise you Smile

for me old url is better...
more easy to understand structure... only change id of thread...
and i has system that generate link and use old structure...
[Image: 2mSucuo.png]

for me this isn't something essential... and redirect system probably use several resource. if possible on/off this feature (redirect old url).
Reply
#9
It doesn't use any resources, as IDs will be preserved during the upgrade.
Reply
#10
(11-07-2015, 06:24 PM)Euan T Wrote: It doesn't use any resources, as IDs will be preserved during the upgrade.

not?
for me till rewrite htaccess use resource of server...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)