Announcement

Collapse
No announcement yet.

Basic SEO Improvements for User Profile page

Collapse
X
Collapse
First Prev Next Last
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Free Mod Basic SEO Improvements for User Profile page

    You may have seen the following from "HTML Improvements" in the Search Console for Google Webmasters tool.

    1. Duplicate meta descriptions
    2. Short meta descriptions
    3. Duplicate title tags

    Most (if not all) of them pertain to the User Profile page. By default, vB5 only uses "User Profile" as the page title and meta description. Since each forum member has its own user profile page, all of those pages have the same title and description which is not good for SEO.

    To fix this issue, it will require editing the "header" template in Style Manager in AdminCP.

    Insert this code at the top of the header template:
    Code:
    <vb:if condition="isset($page['pageid']) AND $page['pageid'] == 8">
       {vb:set profile_title, 'User Profile for '}
       {vb:strcat profile_title, {vb:var page.username}}
       {vb:set page.title, {vb:raw profile_title}}
       {vb:set profile_desc, {vb:var page.username}}
       {vb:strcat profile_desc, ' is a member of vBMods.rocks community. Visit their profile for more details on their activities, basic information and more.'}
       {vb:set page.metadescription, {vb:raw profile_desc}}
    </vb:if>
    The page ID, which is 8 in the code above and is the default page ID in a fresh vB5 installation, is the page id for the User Profile page. It may be different on your forum. To find it, go to any user profile page and then view the the HTML source by right-clicking on an empty space and choosing "View page source" (or equivalent). Search for "pageid" and you will see the corresponding id for your forum. Use that and replace the number 8 in the code.

    You may also want to change the text I used. For page title I used:
    Code:
    User Profile for [username]
    For meta description, I used:
    Code:
    [username] is a member of vBMods.rocks community. Visit their profile for more details on their activities, basic information and more.
    Change the text accordingly to fit your forum.

    Version History:
    v1.2
    • Updated template code to fix possible "Undefined array key 'pageid'" PHP error in some cases.
    v1.1
    • Updated instructions for latest vB5 version 5.6.x. The template changes are much simpler.
    v1.0
    • Initial version

    NOTES:
    1. If you have the old changes (v1.0), you need to revert them first before applying the new ones. But if you have other edits to the header template other than this one, you will have to re-apply them too because reverting the template will revert all the custom changes.
    2. Since this edits an existing vB template, these changes may introduce template merge conflicts every time you upgrade. You need to resolve those conflicts in AdminCP after upgrading.

    ​​​​​​

    Need help or not comfortable installing this mod? Purchase the installation service below:

    vBulletin One-Time Plugin Installation Service Add-On: $20
    Purchase this product add-on to get one-time professional installation of this mod from us.

    Buy Now Add to Cart View Cart
    Last edited by glennrocksvb; 05-16-2022, 12:12 AM. Reason: Updated template code (v1.2)
    Helpful? Donate. Thanks!
    Buy me a coffeePayPal QR Code
    Fast VPS Host for vBulletin:
    A2 Hosting & IONOS

    #2
    Great... thank you!!!

    PS: Just tried it.. does not change anything

    Comment


    • William
      William commented
      Editing a comment
      Same here. I reverted the header template back to default after noticing the same thing. At least in vb 5.3.2 it doesn't appear to work.

    • NumNum
      NumNum commented
      Editing a comment
      shining are you running 5.3.2 as well?

    • shining
      shining commented
      Editing a comment
      Yes, I do

    #3
    Hmm, this mod is applied here and it's working but I'm still using 5.3.1.

    I need to take a look at your setup to see what's wrong with the code.
    Helpful? Donate. Thanks!
    Buy me a coffeePayPal QR Code
    Fast VPS Host for vBulletin:
    A2 Hosting & IONOS

    Comment


    #4
    Originally posted by shining View Post
    You could take a look in our forum
    Is the mod still installed on your forum? Could you post the entire <vb:if> <vb:elseif> </vb:if> block containing the replacement code? Maybe you replaced the code incorrectly.
    Helpful? Donate. Thanks!
    Buy me a coffeePayPal QR Code
    Fast VPS Host for vBulletin:
    A2 Hosting & IONOS

    Comment


    • shining
      shining commented
      Editing a comment
      Maximum number of characters exceeded. It cannot be more than 10000 characters. The current number of characters is 32173

    • glennrocksvb
      glennrocksvb commented
      Editing a comment
      Do not post the entire template code. Just the <vb:if> <vb:elseif> </vb:if> block containing the replacement code I suggested to use in the first post.

    • William
      William commented
      Editing a comment
      I have the code currently inputted. Here's the meta information though:

      <meta name="twitter:card" content="summary"/>
      <meta name="twitter:site" content="@WChristForums"/>
      <meta name="twitter:creator" content="@WChristForums"/>
      <meta property="og:url" content="https://www.christforums.org/member/1-william"/>
      <meta property="og:title" content="User Profile - Christforums"/>
      <meta property="og:description" content="User Profile"/>
      <meta name="fb:app_id" content="626127990883163"/>
      <meta property="og:image" content="https://www.christforums.org/cf.jpg"/>

    #5
    Originally posted by glennrocksvb View Post
    Do not post the entire template code. Just the <vb:if> <vb:elseif> </vb:if> block containing the replacement code I suggested to use in the first post.
    Ups... I only read "entire code"

    Here you are:

    Code:
        <title>
            <vb:if condition="$page['channelid'] != $nodeid AND !empty($conversationStarter) AND isset($conversationStarter['htmltitle']) AND !empty($conversationStarter['htmltitle'])">
                {vb:raw conversationStarter.htmltitle} - 
            <vb:elseif condition="isset($page['title'])" />
                <vb:if condition="!empty($page['titleprefix'])"> {vb:raw page.titleprefix} -  </vb:if>
                {vb:var page.title} - <vb:comment>We have a page, not a channel. We don't allow html in page titles at the moment.</vb:comment>
            <vb:elseif condition="$page['pageid'] == 8" />
                {vb:set profile_title, 'Profil von '}
                {vb:strcat profile_title, {vb:var page.username}}
                {vb:raw profile_title} -
    
                {vb:set profile_desc, {vb:var page.username}}
                {vb:strcat profile_desc, ' ist Mitglied in der xy.'}
                {vb:set page.metadescription, {vb:raw profile_desc}}
            </vb:if>
            {vb:var vboptions.bbtitle}
        </title>

    Comment


    • shining
      shining commented
      Editing a comment
      No.. still just Profile - xy in the Title

      But I am sure that when the forum was new (on 5.2.5 or 5.2.6) there were Usernames in Title... maybe there is a problem with the phrase translations? Because for the profile page title you can change the phrase and I guess that this needs to be customized too?

    • glennrocksvb
      glennrocksvb commented
      Editing a comment
      shining, is the page id for your profile page 8 too?

    • shining
      shining commented
      Editing a comment
      Yes, checked that several times... "pageid": "8", and in body tag also class="l-desktop page8 vb-page view-mode"

    • glennrocksvb
      glennrocksvb commented
      Editing a comment
      Did you modify the header template in the correct theme/style? Just making sure...

    • shining
      shining commented
      Editing a comment
      yes

    #6
    Ok I finally saw what's wrong with the code.

    Code:
    <title>
        <vb:if condition="$page['pageid'] == 8">
            {vb:set profile_title, 'Profil von '}
            {vb:strcat profile_title, {vb:var page.username}}
            {vb:raw profile_title} -
    
            {vb:set profile_desc, {vb:var page.username}}
            {vb:strcat profile_desc, ' ist Mitglied in der xy.'}
            {vb:set page.metadescription, {vb:raw profile_desc}}
        <vb:elseif condition="$page['channelid'] != $nodeid AND !empty($conversationStarter) AND isset($conversationStarter['htmltitle']) AND !empty($conversationStarter['htmltitle'])" />
            {vb:raw conversationStarter.htmltitle} -
        <vb:elseif condition="isset($page['title'])" />
            <vb:if condition="!empty($page['titleprefix'])"> {vb:raw page.titleprefix} -  </vb:if>
            {vb:var page.title} - <vb:comment>We have a page, not a channel. We don't allow html in page titles at the moment.</vb:comment>    
        </vb:if>
        {vb:var vboptions.bbtitle}
    </title>
    I basically moved my code up to be the first if-condition. Let me know if this fixes the issue so I can update the instructions in the first post.
    Helpful? Donate. Thanks!
    Buy me a coffeePayPal QR Code
    Fast VPS Host for vBulletin:
    A2 Hosting & IONOS

    Comment


    • shining
      shining commented
      Editing a comment
      Now it works

    • glennrocksvb
      glennrocksvb commented
      Editing a comment
      Thanks for confirmation.

    #7
    FYI, first post updated with the fix.
    Helpful? Donate. Thanks!
    Buy me a coffeePayPal QR Code
    Fast VPS Host for vBulletin:
    A2 Hosting & IONOS

    Comment


      #8
      This is wonderful, thanks!

      Comment


        #9
        i will check it at any time

        Comment


          #10
          I updated the the Profile page meta description in the first post from:

          <username> is a member of vBMods.rocks community.

          to:

          <username> is a member of vBMods.rocks community. Visit their profile for more details on their activities, basic information and more.

          I did this because Google Webmaster is complaining that the previous meta description was too short. I don't know exactly what the minimum length is but I read somewhere that it is 50 characters, but some say 70. The ideal length is 150-160 characters, beyond that Google or other search engines may truncate it in the search result pages. So don't make it too long or too short.

          You may want to update your own meta description for Profile page accordingly.
          Helpful? Donate. Thanks!
          Buy me a coffeePayPal QR Code
          Fast VPS Host for vBulletin:
          A2 Hosting & IONOS

          Comment


            #11
            So i just did this. And i really have no idea what i did. I just see all the cool kids doing it here. lol What have i done exactly?

            Comment


            • glennrocksvb
              glennrocksvb commented
              Editing a comment
              This mod changes the title and meta description of User Profile page of each user to unique values to avoid duplicates. This is good for SEO.

            • Fleet
              Fleet commented
              Editing a comment
              Cool. Thanks for the clarification.

            #12
            You may also want to change the default short meta description of some of the vB5 pages. These little adjustments to the description will help your pages to have better click-rate in the search engine result pages.
            1. Blogs - default is "Blogs"
            2. Memberlist - default is "Member List"
            3. Calendar - default is "Calendar and Upcoming Events"
            4. Social Groups - default is "Groups"
            5. Articles - default is "This is the top level CMS page that shows all categories that hold the articles on this site" which is not short but not a good meta description. Change this to be more descriptive of your article content.
            Helpful? Donate. Thanks!
            Buy me a coffeePayPal QR Code
            Fast VPS Host for vBulletin:
            A2 Hosting & IONOS

            Comment


              #13
              I just added "Disallow: /member/" to my robots.txt file so google would ignore the user pages. I didnt see any valuable SEO content on the user pages, but maybe there is?

              Comment


                #14
                Activities is the default tab for user profile and it contains the user's posts. So I guess it has value for SEO.
                Helpful? Donate. Thanks!
                Buy me a coffeePayPal QR Code
                Fast VPS Host for vBulletin:
                A2 Hosting & IONOS

                Comment


                  #15
                  hi glenn

                  appear : user profile for glennrocksvb

                  is not it better to delete user profile for?

                  Comment

                  Users Viewing This Page

                  Collapse

                  There is 1 user viewing this forum topic.

                  • Guest Guest

                  Latest Posts

                  Collapse

                  Working...
                  X
                  Searching...Please wait.
                  An unexpected error was returned: 'Your submission could not be processed because you have logged in since the previous page was loaded.

                  Please push the back button and reload the previous window.'
                  An unexpected error was returned: 'Your submission could not be processed because the token has expired.

                  Please push the back button and reload the previous window.'
                  An internal error has occurred and the module cannot be displayed.
                  There are no results that meet this criteria.
                  Search Result for "|||"