vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Mini Mods - HTTP Error Response Codes by BOP5 (Help reduce "soft 404" errors for improved SEO) (https://vborg.vbsupport.ru/showthread.php?t=309417)

BirdOPrey5 03-10-2014 11:00 PM

HTTP Error Response Codes by BOP5 (Help reduce "soft 404" errors for improved SEO)
 
1 Attachment(s)
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 two 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. :up:

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

Please "Mark as Installed" if you use this. :)
Donations always appreciated. :up:
Nominate MOTM if you LOVE it! ;)

BirdOPrey5 03-11-2014 04:59 PM

Reserved

Abu2 03-12-2014 06:42 PM

On 3.8.4:
This product is not compatible with version 5.1.6 of PHP. (Compatible starting with 5.4.0) :(

BirdOPrey5 03-12-2014 07:11 PM

Quote:

Originally Posted by Abu2 (Post 2486748)
On 3.8.4:
This product is not compatible with version 5.1.6 of PHP. (Compatible starting with 5.4.0) :(

Hello,

Please read the first post- it explains the problem.

Quote:

The major limitation of this mod is it requires PHP 5.4.0 or higher. If you are on older versions of PHP the mod will not install.

atcspaul 04-01-2014 12:43 AM

great mod bop, i just checked with my host and they said this:
Sure, we can upgrade PHP version on your server.

The PHP version you are using currently is PHP v5.2.11. Hence, I would suggest you to check your site scripts by getting in touch with your developer since most of the functions in PHP v5.2.11 are deprecated in PHP v5.4. So, if you blankly do an upgrade to PHP v5.4 it may cause many errors in sites and it may even not load.


my computer skills are limited so i will watch for updates :(

BirdOPrey5 04-01-2014 12:53 AM

Make sure you are running VB 3.8.8 Beta before they upgrade your site's PHP.

atcspaul 04-01-2014 01:11 AM

ohh thanks bop, i am using 3.8.7 and will wait till 3.8.8 gets out of beta, i am an old man and they were inventing calculators when i was in school so not real good with computers so minor things take me forever to figure out and fix, thank you again and as i said great mod

Zachery 04-01-2014 04:27 AM

Any reason you can't use header for PHP versions lower than 5.4?

BirdOPrey5 04-01-2014 09:16 AM

Quote:

Originally Posted by atcspaul (Post 2490793)
ohh thanks bop, i am using 3.8.7 and will wait till 3.8.8 gets out of beta, i am an old man and they were inventing calculators when i was in school so not real good with computers so minor things take me forever to figure out and fix, thank you again and as i said great mod

3.8.8 Beta 4 is as stable as any other version. You can wait if you wish but it is going to be months before it is out of beta, there is no rush to get it out of beta.

Quote:

Originally Posted by Zachery (Post 2490812)
Any reason you can't use header for PHP versions lower than 5.4?

The header function can only be called before any output is sent to the browser and in my tests output has already been sent by the time these hooks are executed resulting in the changes not being made.

Zachery 04-01-2014 09:19 AM

Ah, that does make some sense then.


All times are GMT. The time now is 12:06 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01088 seconds
  • Memory Usage 1,738KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete