Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Add-ons

Reply
 
Thread Tools
SEOvB - Link Canonicalization for vBulletin Stop Duplicate Content NOW! Details »»
SEOvB - Link Canonicalization for vBulletin Stop Duplicate Content NOW!
Version: 1.00, by SEOvB SEOvB is offline
Developer Last Online: May 2015 Show Printable Version Email this Page

Category: Add-On Releases - Version: 3.8.1 Rating:
Released: 02-15-2009 Last Update: 02-15-2009 Installs: 65
Uses Plugins Auto-Templates
 
No support by the author.

Squash vBulletin Duplicate Content Completely with Canonical URL's!
Courtesy of SEO vBulletin Services
tags: seo, vbulletin, vbulletin seo, link canonical, canonical

Google, MSN, and Yahoo have just relased a new tag for stopping duplicate content even further. Combining a good and valid vBulletin Robots.txt file along with the new canonical tag can destroy any duplicate content penalty your vBulletin powered forums may have had going on.

Quote:
Originally Posted by Search Engines
Carpe diem on any duplicate content worries: we now support a format that allows you to publicly specify your preferred version of a URL. If your site has identical or vastly similar content that's accessible through multiple URLs, this format provides you with more control over the URL returned in search results. It also helps to make sure that properties such as link popularity are consolidated to your preferred version
Canonical Link URL Faq
Is rel="canonical" a hint or a directive?
It's a hint that we honor strongly. We'll take your preference into account, in conjunction with other signals, when calculating the most relevant page to display in search results.

Can I use a relative path to specify the canonical, such as <link rel="canonical" href="product.php?item=swedish-fish" />?
Yes, relative paths are recognized as expected with the <link> tag. Also, if you include a <base> link in your document, relative paths will resolve according to the base URL.

Is it okay if the canonical is not an exact duplicate of the content?
We allow slight differences, e.g., in the sort order of a table of products. We also recognize that we may crawl the canonical and the duplicate pages at different points in time, so we may occasionally see different versions of your content. All of that is okay with us.

What if the rel="canonical" returns a 404?
We'll continue to index your content and use a heuristic to find a canonical, but we recommend that you specify existent URLs as canonicals.

What if the rel="canonical" hasn't yet been indexed?
Like all public content on the web, we strive to discover and crawl a designated canonical URL quickly. As soon as we index it, we'll immediately reconsider the rel="canonical" hint.

Can rel="canonical" be a redirect?
Yes, you can specify a URL that redirects as a canonical URL. Google will then process the redirect as usual and try to index it.

What if I have contradictory rel="canonical" designations?
Our algorithm is lenient: We can follow canonical chains, but we strongly recommend that you update links to point to a single canonical page to ensure optimal canonicalization results.

Can this link tag be used to suggest a canonical URL on a completely different domain?
No. To migrate to a completely different domain, permanent (301) redirects are more appropriate. Google currently will take canonicalization suggestions into account across subdomains (or within a domain), but not across domains. So site owners can suggest www.example.com vs. example.com vs. help.example.com, but not example.com vs. example-widgets.com.

Sounds great can I see an example in action
Sure, here is a wordpress blog that has implemented canonical URL's already: http://obamanewssource.com Our vBulletin powered site that has made this implementation is only a test site.

How can I check if its working
Go to your showthread page, and hit view source, and search for "canonical" and you should see it automatically added. If its not automatically added for whatever reason, remove the product file thats attached and make this simple template edit to the end of your vBulletin headinclude template (it's a good idea to do this on all headinclude templates)

Code:
<if condition="(THIS_SCRIPT == showthread) OR (THIS_SCRIPT == showpost) OR (THIS_SCRIPT == printthread)">
<link rel="canonical" href="$vboptions[bburl]/showthread.php?t=$threadinfo[threadid]<if condition="$pagenumber>1">&page=$pagenumber</if>" />
</if>
<if condition="THIS_SCRIPT == index">
<link rel="canonical" href="$vboptions[bburl]" />
</if>
Tip: If you allow only access from www, or non-www version of your content, make sure your vBulletin path is set correctly!

Install Instructions
Upload attached product.xml file to your vBulletin forums using the built in product manager

Uninstall Instructions
Sorry to hear the modification isn't working, to uninstall it, simply use the uninstall function of the product manager

Download Now

File Type: xml product-linkcanonicalization123.xml (2.2 KB, 508 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Благодарность от:
davidg

Comments
  #32  
Old 03-15-2009, 10:16 AM
SEOvB's Avatar
SEOvB SEOvB is offline
 
Join Date: May 2007
Location: Indianapolis
Posts: 2,451
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by roddy View Post
Ok, there is a problem here.
showthread.php?t=26237&page=9 > works fine

showthread.php?p=179223#post179223 > doesn't work.

Am seeing if I can figure it out, but probably I can't . . .

Edit: It does work if you paste it in below "$headinclude" in SHOWTHREAD. But not in SHOWTHREAD_SHOWPOST
What is displaying for the cannonical URL you when you go to

showthread.php?t=26237&page=9


What is displaying as the cannonical URL for

showthread.php?p=179223#post179223

(This one should show, showthread.php?=179223, search engines don't bother with the relative anchor #post179223)
Reply With Quote
  #33  
Old 03-15-2009, 10:19 AM
SEOvB's Avatar
SEOvB SEOvB is offline
 
Join Date: May 2007
Location: Indianapolis
Posts: 2,451
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by brandonroy View Post
Installed. I did the manual edit and I took out this:

Code:
<if condition="THIS_SCRIPT == index">
<link rel="canonical" href="$vboptions[bburl]" />
</if>
Because I have my forum index set to /forum.php and it was adding <link rel="canonical" href="http://www.example.com" /> to forum.php which is not what I wanted!

Is that ok?

EDIT:
And also, if a post is on page=2 or page=3, etc - Shouldn't the showpost.php?p= have the canonical URL of showthread.php?t=555&page=2 instead of just showthread.php?t=555 ? Or is that not a big deal?
Yes, the first edit is fine, as the index page usually isn't the root of duplicate content evils.

Even changing it to
Code:
<link rel="canonical" href="$vboptions[bburl]/forum.php" />
Should work, or simply inserting your entire forum URL in there

Yes it should add the &page to it.

I thought I had multipage support enabled on it, but apparently not. I apologize for that as I only have a test forum that doesn't have any multi page threads but I guess i'll have to create one now.

Edit: I just downloaded the version attached and installed it on a test site and its adding the page numbers okay.
Reply With Quote
  #34  
Old 03-15-2009, 10:20 AM
SEOvB's Avatar
SEOvB SEOvB is offline
 
Join Date: May 2007
Location: Indianapolis
Posts: 2,451
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by abilitydesigns View Post
total vbulletin newbie here.

Pardon my ignorance, but can anybody walk me thro' the process of installing this mod?

i downloaded the file but don't know what to do next? ( there's no read me? )

again sorry for such a basic question

AD
The first post has install instructions at the very bottom.

Install Instructions
Upload attached product.xml file to your vBulletin forums using the built in product manager

Thats all there is to the install. If it doesn't work, the first post also contains information on a manual template edit to fix that.
Reply With Quote
  #35  
Old 03-15-2009, 05:19 PM
MTGDarkness MTGDarkness is offline
 
Join Date: Dec 2008
Posts: 270
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

PHP Code:
<if condition="(THIS_SCRIPT == showthread) OR (THIS_SCRIPT == showpost) OR (THIS_SCRIPT == printthread)">
<
link rel="canonical" href="$vboptions[bburl]/showthread.php?t=$threadinfo[threadid]<if condition="$pagenumber>1">&page=$pagenumber</if>" />
</if>
<if 
condition="THIS_SCRIPT == index">
<
link rel="canonical" href="$vboptions[bburl]/>
</if> 
Is wrong.
Specifically:
PHP Code:
"$pagenumber>1">&page=$pagenumber</if>" /> 
Typo, or real code? I'm dubious...

I used this fix:
PHP Code:
<link rel="canonical" href="$vboptions[bburl]/showthread.php?t=$threadinfo[threadid]<if condition="$pagenumber">&page=$pagenumber</if> 
That works on my board.
Reply With Quote
  #36  
Old 03-16-2009, 10:13 AM
SEOvB's Avatar
SEOvB SEOvB is offline
 
Join Date: May 2007
Location: Indianapolis
Posts: 2,451
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MTGDarkness View Post
PHP Code:
<if condition="(THIS_SCRIPT == showthread) OR (THIS_SCRIPT == showpost) OR (THIS_SCRIPT == printthread)">
<
link rel="canonical" href="$vboptions[bburl]/showthread.php?t=$threadinfo[threadid]<if condition="$pagenumber>1">&page=$pagenumber</if>" />
</if>
<if 
condition="THIS_SCRIPT == index">
<
link rel="canonical" href="$vboptions[bburl]/>
</if> 
Is wrong.
Specifically:
PHP Code:
"$pagenumber>1">&page=$pagenumber</if>" /> 
Typo, or real code? I'm dubious...
Nope thats real code straight from standard vBulletin templates
Quote:
I used this fix:
PHP Code:

<link rel="canonical" href="$vboptions[bburl]/showthread.php?t=$threadinfo[threadid]<if condition="$pagenumber">&page=$pagenumber</if> 
That works on my board.
Same result, i just took the code vBulletin uses to deliver the multi-page threads (see showthread title tags)

And you may want to toss " /> at the end of your method :up:
Reply With Quote
  #37  
Old 03-16-2009, 05:03 PM
MTGDarkness MTGDarkness is offline
 
Join Date: Dec 2008
Posts: 270
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I feel kinda stupid now.
Reply With Quote
  #38  
Old 03-16-2009, 05:09 PM
SEOvB's Avatar
SEOvB SEOvB is offline
 
Join Date: May 2007
Location: Indianapolis
Posts: 2,451
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Don't man! You were just trying to help!

Reply With Quote
  #39  
Old 03-18-2009, 05:08 AM
brandonroy brandonroy is offline
 
Join Date: Dec 2008
Location: Louisiana
Posts: 64
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by FRDS View Post
Yes, the first edit is fine, as the index page usually isn't the root of duplicate content evils.

Even changing it to
Code:
<link rel="canonical" href="$vboptions[bburl]/forum.php" />
Should work, or simply inserting your entire forum URL in there

Yes it should add the &page to it.

I thought I had multipage support enabled on it, but apparently not. I apologize for that as I only have a test forum that doesn't have any multi page threads but I guess i'll have to create one now.

Edit: I just downloaded the version attached and installed it on a test site and its adding the page numbers okay.
It's adding page numbers ok for showthread, but not for showpost! If you view a single post on page 2 for example, the canonical URL points to the first page of the thread.
Reply With Quote
  #40  
Old 03-30-2009, 01:54 PM
Dave-ahfb Dave-ahfb is offline
 
Join Date: Mar 2002
Posts: 117
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Did I miss something or does this not include on forumdisplay?
Reply With Quote
  #41  
Old 06-04-2009, 08:56 AM
atmaca's Avatar
atmaca atmaca is offline
 
Join Date: Jan 2008
Location: Turkey/Gaziantep
Posts: 64
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This hack does not working with Zoints SEO For examle, my link:
Quote:
http://www.ceptecep.net/4-haziran-t6884.html?t=6884
But it's showing at page source
Quote:
<link rel="canonical" href="http://www.ceptecep.net/showthread.php?t=6884" />
How this work with Zoints SEO?
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:59 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.08290 seconds
  • Memory Usage 2,368KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_code
  • (6)bbcode_php
  • (9)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (1)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (1)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete