PDA

View Full Version : Mini Mods - Global rel canonical for vbulletin as vBSEO v1.1 final, remove duplicate content


abdobasha2004
10-12-2009, 10:00 PM
This is a simple mod. to apply rel="canonical" (http://googlewebmastercentral.blogspot.com/2009/02/specify-your-canonical.html) to vbulletin pages.
Presented from : http://www.nmisr.com/vb/

this is applied for : showthread, forumdisplay and forumhome.
Template Edits : 3
Value : SEO value :
1 - Prevent duplicate content
2 - Better page rank assignment to your page as a result

3 steps :
Open vbulletin admin pannel ---> Edit style templates ---> {choose your used style}
then :

1- Find Showthread template, then you have 2 options :
i) include thread pages (if the thread have multiple pages) then Find </head> and before it add :
<!-- 100fm6.com canonical -->
<link rel="canonical" href="$vboptions[bburl]/showthread.php?t=$threadinfo[threadid]<if condition="$pagenumber>1">&page=$pagenumber</if>" />
<!-- /100fm6.com canonical -->

ii) Include only the first page of threads then Find </head> and before it add :
<!-- 100fm6.com canonical -->
<link rel="canonical" href="$vboptions[bburl]/showthread.php?t=$threadinfo[threadid]" />
<!-- /100fm6.com canonical -->

2- Find Forumhome template, then Find </head> and before it add :
<!-- 100fm6.com canonical -->
<link rel="canonical" href="$vboptions[bburl]" />
<!-- /100fm6.com canonical -->

3- Find Forumdisplay, then you have 2 options :
i) include forumdisplay pages (Recommended) then Find </head> and before it add :
<!-- 100fm6.com canonical -->
<link rel="canonical" href="$vboptions[bburl]/forumdisplay.php?f=$foruminfo[forumid]<if condition="$pagenumber>1">&page=$pagenumber</if>" />
<!-- /100fm6.com canonical -->

ii) Include only the first page of forums then Find </head> and before it add :
<!-- 100fm6.com canonical -->
<link rel="canonical" href="$vboptions[bburl]/forumdisplay?f=$foruminfo[forumid]" />
<!-- /100fm6.com canonical -->

for better SEO try to make this compatible with sitemap options

For any suggestion, I will be glad to here from you ...
Thanks to FRDS (https://vborg.vbsupport.ru/member.php?u=200299) who have made this as a product (https://vborg.vbsupport.ru/showthread.php?p=1745800)

ChopSuey
10-12-2009, 10:52 PM
This is duplicate content already.
https://vborg.vbsupport.ru/showthread.php?t=225080

abdobasha2004
10-12-2009, 11:00 PM
nope
it is version 1.1
it is now for all pages : threads, forum main and forums

MagicThemeParks
10-13-2009, 12:43 AM
So, is this one the best option or the other one?

goxy63
10-13-2009, 02:05 AM
Obviously this one, it even says on previous version "better" one (on a link to this one)

What are bad(if there are any) and what are good sides of this mod, please elaborate a bit
I mean this code looks pretty much simple even for me as a noob here, why vb wouldnt have such a thing by default?

Thanks

thincom2000
10-13-2009, 05:37 AM
The "include pages" variants don't validate as XHTML 1.0 Transitional.

This can be fixed using &amp; instead of &

erel34
10-13-2009, 05:37 AM
Thanks

abdobasha2004
10-13-2009, 01:55 PM
So, is this one the best option or the other one?
of course this one version 1.1

why vb wouldnt have such a thing by default
the latest version of vbulletin was made before rel canonical ever existed ! also it is an optional SEO task that may not be found even in vBulletin 4.


The "include pages" variants don't validate as XHTML 1.0 Transitional.

This can be fixed using &amp; instead of &
thanks I do not know how I missed this...
Code changed ....

Lustikus
10-13-2009, 03:43 PM
does this mod work for TFseo as well as for vbseo?

abdobasha2004
10-13-2009, 03:57 PM
does this mod work for TFseo as well as for vbseo?
yea
and vbseo has it already in the latest version

abdobasha2004
03-27-2010, 09:01 AM
CODE UPDATED..... please remove "amp:" from code of multiple page indexing ...

Dorgham
10-22-2012, 03:56 AM
Thank You AbdoBasha :)

yahsuah
11-20-2012, 10:26 AM
Thank you!

I had been researching for this...

dethfire
05-04-2013, 01:01 PM
I've been using this and Bing Webmaster tools gives me a warning

"Large number of pages pointing to the same canonical URL for domain"

"Canonical tags can be used to help de-dupe URLs for pages with the same or very similar content. Bing has detected that your site is using what appears to be the same canonical URL for a large number of pages that are not the same. This may be indicative of a problem with your HTML template, content publishing system, or site code. You should review the source of your pages and check if the URLs used inside the <link rel="canonical" href="<url>" /> are not accidentally pointing to the same location for all (or too many) pages."

dethfire
05-04-2013, 01:27 PM
<link rel="canonical" href="$vboptions[bburl]/forumdisplay.php?f=$foruminfo[forumid]<if condition="$pagenumber>1">&page=$pagenumber</if>" />

This is not working. I go to say page 4 and it doesn't add the pagenumber to the url

matrex722
05-29-2013, 08:33 AM
i hope it work good
thanks for sharing it

yahsuah
08-15-2014, 04:49 PM
Thanks!

blackberry
08-27-2014, 06:27 PM
does it work for vb 4.x?

ozzy47
08-27-2014, 06:34 PM
No as this was written for vB3 so it would not work in vB4

blackberry
08-30-2014, 10:14 AM
No as this was written for vB3 so it would not work in vB4
thanks Any way to get rid off bing canonical error :-s

RELAX13
10-29-2014, 12:14 PM
Good Id :D