MyBB Community Forums

Full Version: HTTP Status
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
This little plugin sends the correct HTTP status code on error pages.
By default, MyBB sends a "200 OK" response for every HTTP request.

Actually almost every search engines only understand HTTP status codes.
The problem is, that "200 OK" for Google & Co. means, everything is alright.

If a thread was deleted, MyBB shows an error message and sends "200 OK".
Google will never be informed about the deletion, so the link remains indexed.

With this plugin, the search engines will understood the error pages properly.

Download
http://mods.mybb.com/view/http-status

Features
400 Bad Request, on invalid search requests.
401 Unauthorized, on invalid login credentials.
403 Forbidden, on the "no permission" error page.
404 Not Found, on invalid forums, threads, profiles etc.
503 Service Unavailable, on board closed, load limit

Install
Upload http_status.php to ./inc/plugins
Activate the plugin [ACP > Configuration > Plugins]

Demo
No demo available at this moment. However this plugin generates no visible output.
To see the effects on error pages, you can use the Firefox Live HTTP Header addon.

License
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
Good Concept.

Can you add the 503 Service Unavailable when the board is closed?
Thanks, very useful for SEO, will use Smile
Is it though? because if google keeps your threads that are deleted indexed and people come to your site and get an error page, they may actually stay on the page and look around!
(2010-09-19, 09:51 AM)Aaron Wrote: [ -> ]Is it though? because if google keeps your threads that are deleted indexed and people come to your site and get an error page, they may actually stay on the page and look around!
Although, they may get put off by the error page.
(2010-09-19, 09:51 AM)Aaron Wrote: [ -> ]Is it though? because if google keeps your threads that are deleted indexed and people come to your site and get an error page, they may actually stay on the page and look around!

It wouldn't keep the thread indexed, but the error page. And you want Google to index your actual content, not tons of error pages. It's a good idea to send proper HTTP status codes in any case. Google SEO does the same (although more blunt in that it uses 404 for any error).

I'd prefer this to be a core feature actually, but oh well. A plugin either has to do one code for all or actually build lists of errors as this one does; downside of either approach is that it will never be complete or correct. It'll just have to do.
Thanks for the feedback.

I've updated the plugin to v1.0.1 - some more error pages are included now.
And the plugins sends "503 Service Unavailable" on board closed or load limit.

If there are more suggestions, feel free to PM me or just post in this thread Wink
yes, this should be a MyBB core feature Smile
Nice plugin, and thanks for the features.
nice ..