Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
HTTP Error Response Codes by BOP5 (Soft 404 Solution) Details »
HTTP Error Response Codes by BOP5 (Soft 404 Solution)
Mod Version: 2.2.1, by BirdOPrey5 (IB Staff) BirdOPrey5 is offline
Developer Last Online: Feb 2019 I like it Show Printable Version Email this Page

vB Version: 4.x.x Rating: (14 votes - 5.00 average) Installs: 90
Released: 11 Mar 2014 Last Update: 27 May 2014 Downloads: 338
Supported Uses Plugins Re-usable Code  

Brought to you by BirdOPrey5 / Qapla.com

This issue was brought to my attention by Sherrie at TAZ in this thread.

The issue is that when Google crawls a site and runs into the vBulletin No Permission message or other standard vBulletin error pages vBulletin gives the standard "200" HTTP response code which means everything is OK, even though there is no real content on these pages. Therefore Google considers these "soft errors" and they can damage overall SEO of your site if there are too many of them.

What this does is make vBulletin return standard HTTP "Error" responses- by default 403 (Not Authorized) for No Permission pages and 404 (Not Found) for general error messages. When Google sees these responses (as opposed to 200) it knows not to bother indexing the page and everyone is happy.

As of version 2.2 new options have been added to return custom response codes when the forum is closed or when the forum is busy. It will also send a retry header telling the crawler they can try again later. As of version 2.0 there is also a separate response code for search.php errors.

A limitation of this mod is it works best with PHP 5.4.0 or higher. As of version 2.0 If you are on an older version of PHP it may not work, but it should not cause any errors, so it is worth trying.

There are no instructions, once installed it is enabled by default. In Admin CP -> Settings -> Options -> HTTP Error Responses by BOP5 you can enable/disable the mod and choose the response codes you want for the different error types. You can use any standard HTTP response code available from this list at wikipedia.

The mod works fine on VB 3.x or 4.x including VB 3.8.8 (still in Beta) and VB 4.2.2.

To test that it is working use a free online status checker such as: http://httpstatus.io/
(Note the site will cache your result for a while so test with a unique URL each time.)

Before you install the mod any URL that will show a no-permission or other vBulletin error will show a status code of 200. After installing the same page will show a 403, 404, or other code that you have configured.

Added Boothby as a "co-author" as thanks for his contribution of code and ideas.

------------------------------------------------------

Please "Mark as Installed" if you use this.
Donations always appreciated.
Nominate MOTM if you LOVE it! (You did, Thanks!)

Download Now

Only licensed members can download files, Click Here for more information.

Supporters / CoAuthors

Screenshots

Click image for larger version

Name:	http_codes_ss_settings-v2.jpg
Views:	397
Size:	107.6 KB
ID:	149188  

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • If you like this modification support the author by donating.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
  #46  
Old 21 May 2014, 09:04
Boothby Boothby is offline
 
Join Date: Mar 2002
Real name: Stefan
Those who have < PHP5.4 can add the following at the beginning of the error_generic plug-in and test it. This is a non standardized method, so it may or may not work.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

source: http://www.liketly.com/forum/thread/...response-code/

Thanks to RolandCP for the hint.
Reply With Quote
  #47  
Old 21 May 2014, 10:31
DemOnstar's Avatar
DemOnstar DemOnstar is offline
 
Join Date: Dec 2012
I have 96 warnings from webmaster tools.



Not entirely sure how to deal with them and if this is the correct procedure but installed to see what happens.
Attached Images
File Type: jpg warnings.jpg (17.4 KB, 137 views)
Reply With Quote
  #48  
Old 21 May 2014, 12:17
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
Originally Posted by Boothby View Post
Those who have < PHP5.4 can add the following at the beginning of the error_generic plug-in and test it. This is a non standardized method, so it may or may not work.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

source: http://www.liketly.com/forum/thread/...response-code/

Thanks to RolandCP for the hint.
Wow- I tested this on 3 forums (1 VB 3.8, 2 VB 4.x) and it worked fine on all 3.

You should copy the code to the top of both plugins however.

Do you mind if I add the code to the plugin?
__________________
-Joe
Former vBulletin.org Staff Member

(@BirdOPrey5) Former vb.org Moderator. Fighting for a free & independent vb.org.
BirdOPrey5.com - Exclusive VB Mods! (Formerly Qapla.com) | Joe's Ultimate Off Topic
Note - I do not read my PMs often, do not expect quick replies.
Reply With Quote
  #49  
Old 21 May 2014, 12:17
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
Originally Posted by DemOnstar View Post
I have 96 warnings from webmaster tools.



Not entirely sure how to deal with them and if this is the correct procedure but installed to see what happens.
You should ignore those- the robots.txt is doing what it is supposed to do.
__________________
-Joe
Former vBulletin.org Staff Member

(@BirdOPrey5) Former vb.org Moderator. Fighting for a free & independent vb.org.
BirdOPrey5.com - Exclusive VB Mods! (Formerly Qapla.com) | Joe's Ultimate Off Topic
Note - I do not read my PMs often, do not expect quick replies.
Reply With Quote
  #50  
Old 21 May 2014, 12:28
addamroy addamroy is offline
 
Join Date: Sep 2010
damn, my host's server (urljet) is using a prior version of php

I was all excited to install this lol
Reply With Quote
  #51  
Old 21 May 2014, 13:15
DemOnstar's Avatar
DemOnstar DemOnstar is offline
 
Join Date: Dec 2012
I tested the urls using the site that you provided and do still show status 200.

Originally Posted by BirdOPrey5 View Post
You should ignore those- the robots.txt is doing what it is supposed to do.
Cheers Joe, as you say...
Reply With Quote
  #52  
Old 21 May 2014, 14:32
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
Originally Posted by addamroy View Post
damn, my host's server (urljet) is using a prior version of php

I was all excited to install this lol
See post 46 b& 48, I have URLjet and it is working with those changes.
__________________
-Joe
Former vBulletin.org Staff Member

(@BirdOPrey5) Former vb.org Moderator. Fighting for a free & independent vb.org.
BirdOPrey5.com - Exclusive VB Mods! (Formerly Qapla.com) | Joe's Ultimate Off Topic
Note - I do not read my PMs often, do not expect quick replies.
Reply With Quote
  #53  
Old 21 May 2014, 14:33
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
Originally Posted by DemOnstar View Post
I tested the urls using the site that you provided and do still show status 200.
What URL did you test?
__________________
-Joe
Former vBulletin.org Staff Member

(@BirdOPrey5) Former vb.org Moderator. Fighting for a free & independent vb.org.
BirdOPrey5.com - Exclusive VB Mods! (Formerly Qapla.com) | Joe's Ultimate Off Topic
Note - I do not read my PMs often, do not expect quick replies.
Reply With Quote
  #54  
Old 21 May 2014, 16:09
CAG CheechDogg's Avatar
CAG CheechDogg CAG CheechDogg is offline
 
Join Date: Feb 2012
Originally Posted by BirdOPrey5 View Post
Wow- I tested this on 3 forums (1 VB 3.8, 2 VB 4.x) and it worked fine on all 3.

You should copy the code to the top of both plugins however.

Do you mind if I add the code to the plugin?
What does this exactly do BOP5? I installed this on my forums using 5.4 "then" reverted my PHP back to 5.3 since my website not my forums wont work with 5.4 ...I have an old version of Joomla as my CMS which is nicely bridged with my VB forums so using 5.4 is not even an option so I have to stick with 5.3..
Reply With Quote
  #55  
Old 21 May 2014, 16:29
Boothby Boothby is offline
 
Join Date: Mar 2002
Real name: Stefan
Originally Posted by BirdOPrey5 View Post
Do you mind if I add the code to the plugin?
Joe, feel free to use this code. I see no problems not to do so. Look at the small source-link. I think this code is too generic so that everyone can use it.
Reply With Quote
  #56  
Old 21 May 2014, 16:46
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
Originally Posted by Boothby View Post
Joe, feel free to use this code. I see no problems not to do so. Look at the small source-link. I think this code is too generic so that everyone can use it.
Great, thanks! Mod has been updated to version 2.0 to include this code. No longer limited to PHP 5.4.0 or higher.

Originally Posted by CAG CheechDogg View Post
What does this exactly do BOP5? I installed this on my forums using 5.4 "then" reverted my PHP back to 5.3 since my website not my forums wont work with 5.4 ...I have an old version of Joomla as my CMS which is nicely bridged with my VB forums so using 5.4 is not even an option so I have to stick with 5.3..
Suggest you upgrade to version 2.0. If it can work, it will work. It should not cause any errors on your site even if the code doesn't work for some reason.

The new code attempts to change the response code if it can (which isn't guaranteed on old PHP versions) but it won't bug out if it can't it just won't do anything.
__________________
-Joe
Former vBulletin.org Staff Member

(@BirdOPrey5) Former vb.org Moderator. Fighting for a free & independent vb.org.
BirdOPrey5.com - Exclusive VB Mods! (Formerly Qapla.com) | Joe's Ultimate Off Topic
Note - I do not read my PMs often, do not expect quick replies.
Reply With Quote
  #57  
Old 21 May 2014, 17:16
addamroy addamroy is offline
 
Join Date: Sep 2010
Saweeet.

Installed.
__________________
Amazing Post-bit Legacy Hacks HERE http://www.vbulletin.org/forum/membe...ort=date#hacks

Last edited by addamroy; 21 May 2014 at 18:41.
Reply With Quote
  #58  
Old 21 May 2014, 17:37
CAG CheechDogg's Avatar
CAG CheechDogg CAG CheechDogg is offline
 
Join Date: Feb 2012
Originally Posted by BirdOPrey5 View Post
Great, thanks! Mod has been updated to version 2.0 to include this code. No longer limited to PHP 5.4.0 or higher.

Suggest you upgrade to version 2.0. If it can work, it will work. It should not cause any errors on your site even if the code doesn't work for some reason.

The new code attempts to change the response code if it can (which isn't guaranteed on old PHP versions) but it won't bug out if it can't it just won't do anything.
Good stuff BOP5 and thanks Boothby for the addition !
Reply With Quote
  #59  
Old 21 May 2014, 20:00
Boothby Boothby is offline
 
Join Date: Mar 2002
Real name: Stefan
I looked in the whole code and I think that this small piece can give false results, when working with the custom pre-5.4 http_response_code() function:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Then I have 2 suggestions:

First I found a way to look for outdated searchids. Second maybe we should send a 503 code for forum closed and server too busy?


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

untested
Reply With Quote
  #60  
Old 21 May 2014, 23:12
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
Boothby - These are some great ideas- thanks- I will incorporate most, if not all, into the next version. I will list you as a co-author.

What is the logic behind this line-

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Why should we check what script it is on if the board is turned off?
__________________
-Joe
Former vBulletin.org Staff Member

(@BirdOPrey5) Former vb.org Moderator. Fighting for a free & independent vb.org.
BirdOPrey5.com - Exclusive VB Mods! (Formerly Qapla.com) | Joe's Ultimate Off Topic
Note - I do not read my PMs often, do not expect quick replies.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

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


New To Site? Need Help?

All times are GMT. The time now is 20:59.

Layout Options | Width: Wide Color: