MyBB Community Forums

Full Version: 404 Page Question
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello everyone!

Hope all is well.

I am using version 1.6.8 and experienced the following scenario:


I integrated myBB into my website, and installed Spamalyser. I didn't configure the parameters as well as I should have, and as a result I got a lot of spam posts (1600). I deleted them all, and Google cut my traffic in nearly half for a critical page (webmaster tools saying that I had a ton of soft 404 pages).

..I should have kept them, although Google would have probably penalized me for spam.

Now, life is better.. I get a few random spam posts, but mostly just people posting "test, this just a test" etc.

They are still telling me that those 1600 pages are soft 404, and want me to "fix" them.

So bottom line, is there a way to generate a 404 page when a user tries to access a postid that doesn't exist (because it was deleted) in myBB?

Thanks so much for your help!!
(2013-02-27, 05:51 PM)tekk7 Wrote: [ -> ]So bottom line, is there a way to generate a 404 page when a user tries to access a postid that doesn't exist (because it was deleted) in myBB?

http://www.thesitewizard.com/archive/custom404.shtml
If it's about the http error code, Google SEO 404 provides that...
Hi there thanks for your reply!

I don't know if this will really work - it's not like the page comes back as "error not found" and I want a custom 404, the page actually DOES come back, it just says "there is no post"

You could argue nothing is wrong here, because the website is working properly, but the page generated by the unique id in the url query string is pointing to a post that was deleted. The link isn't broken in the sense that the page isn't being served up.

If i'm not mistaken (and my apologies if I am) I believe your solution would only work in the case where the url is actually invalid (points to a blank page like foo.html where foo does not even exist)

In my case, foo.php?id=1 is a perfectly valid piece of html with the exception that it's body content says "this post does not exist" rather than the original post. Thanks so much!

(2013-02-27, 07:27 PM)effone Wrote: [ -> ]
(2013-02-27, 05:51 PM)tekk7 Wrote: [ -> ]So bottom line, is there a way to generate a 404 page when a user tries to access a postid that doesn't exist (because it was deleted) in myBB?

http://www.thesitewizard.com/archive/custom404.shtml
If it's an error message (through MyBB's error function), the plugin will give it a HTTP error code, and may optionally add the Google 404 widget.

It won't replace it entirely with a custom page, for that you might have to write your own plugin or make a code change at the point where that error you're seeing originates.
Sorry which plugin is it? I didn't see any posted above.

This is an example btw:

http://www.letmeapologize.com/Advice/new...l_quotes=1

So at one time, this was a valid URL, but I deleted the post.
Now it shows up like what you see above.

..It's not returning a 404 though, right? it's just returning content. You're saying I can configure the plugin to return a 404 in the "error content not found" message?

Thanks again for your help!!



(2013-02-28, 07:35 AM)frostschutz Wrote: [ -> ]If it's an error message (through MyBB's error function), the plugin will give it a HTTP error code, and may optionally add the Google 404 widget.

It won't replace it entirely with a custom page, for that you might have to write your own plugin or make a code change at the point where that error you're seeing originates.
Yes, if you want it to return HTTP 404 Not Found instead of HTTP 200 OK, the Google SEO plugin does that (Google SEO 404). You don't have to enable any of its other features if you don't want them.