Wrong Custom 404 Page Displaying

Hello,

Thank you for this script! I will keep it, just in case I decide to try it. Because of possible SEO issues, I may not create empty placeholder links in the menu bar afterall; but if I do, I’ll give this a try. Thanks again!

It’s super easy to do. There’s a bunch of predetermined ratios you can select, or you can make it a percentage of browser height. It’s worth playing around with.

Hi @cynthia, like @jabostick said, you should play with impact, even if it’s on a page you never publish, it’s very easy and very cool. Lots of deferent ways to style it. But that’s a whole different topic.

That JavaScript to disable the top lvl menus @thang found is what I remember seeing before. I just couldn’t find it :nerd_face:.

The blog post about suppressing top level menus that @willwood wrote is here. Maybe Will will see this post and comment on if adding a 301 redirect for the disabled pages is a viable alternative or just wishful thinking on the part of an old hack (me :grin:).

Yes, I will. It looks good, so that’s why I purchased it, but haven’t actually tried to use it much yet. Thanks for letting me know about the predetermined ratios!

hi again,

When I get a chance, I will play around with the Impact Stack and see if I can learn it better. It does look pretty cool, and it’s a shame that I bought it and haven’t really tried it much yet.

Yes, I will hold unto that JavaScript, just in case I decide to go that way, then I will try it. I do appreciate him getting it for me!

After reading Will’s blog post, I’m leaning more on the summary page as you suggested. That way I will avoid the exact duplicate page, plus the possible SEO issue of the empty link thingee. I did create a 301 from one page to the other, but I may delete that and just go with some kind of summary page. Thank you again! :slight_smile:

I hate to say it but here we go again…

Seems the 404 solution above does not actually work correctly (I warned you that I wasn’t sure it would work).

Anyway I have spent hours researching and testing this and the bottom-line is this:

1. If you put the full url to your custom error page in .htaccess (http://Yourdomain…) then the apache web server basically treats it as a redirect and not a 404 no matter what else you do.
After extensive research, I can not find a way around this. If using an ErrorDocument 404 statement you MUST be in the form of: ErrorDocument 404 /YourCustomErrorPage.xxx or it will be treated like a redirect. The php code at the top Does indeed force a 404 but it is for the error doc not the missing page. It does not work as it was explained to me and as I then explained to you. :frowning:

2. I think that something is amiss in the way that RW deals with relative pathing in the generated code.:cry:
This is why /YourCustomErrorPage.xxx does not render properly. It can not find all the components of the error page because when setting on the page causing the error the relative links are wrong.
I have tested every RW choice: Relative to DOCROOT, Relative to page, Relative to website. None of them work. They all seem to generate code relative to page no matter what.

3. I chatted with @greg700 (chillidog hosting) and Tried several different things with no luck.
I chatted with @doobox who told me he finally just modified the source code manually for his custom 404 page and replaced all of the relative urls with full url’s.

4. So, I am sorry to say that unless someone else smarter than me can find a way around this problem there is no good way to do a custom error page in RW. (at least that I can find.)

What should you do?
I really don’t know the best answer at this point, the options seem to be:
a. Nothing - let it just redirect
b. Forget the custom error page and do a simple one in Cpannel (probably best option)
c. Use the modrewrite in .htaccess - but that basically does the same as (a)
d. Manually edit your source and replace all the relative url’s

On this site I did as @doobox and modified the custom 404 page replacing all of the revertive links with absolute links and it seems to be working. But this will not work for my other site that is constantly changing because every time I add a page and the navigation changes I would also have to regenerate then re-edit the custom 404 page.

It looks like I will have to admit defeat on this one (for now).:rage:
Hopefully @dan or @ben will read this and share some wisdom on how to fix the problem.

EDIT: @Doobok to the rescue! Here is the Solution! - Thank You @Doobox!

:scream: Gah!
Thanks for all that remarkable research Scott. I’ll give option d a try for now.

Cheers,
David

Scott,

I can’t believe we’re at it again! Thank you for all the research and hard work you’ve put into this!!

I’m not sure what to do at this point. :cry: I thought it was working when we checked it on the header site. Anyway, I don’t know enough about all this, and I really wanted a custom 404, but maybe it’s not possible with RW.

When I go into Google Analytics, and check the Realtime Overview, and the Top Active Pages, the most active page (by far) is always the 404.php page. It’s usually about 80% of the activity. I don’t know if that’s related to the problem you looked into, or something else, but it seems awfully high to me. It may be normal, I don’t know, but I keep thinking that maybe something is wrong. I thought it might possibly be because I recently rebuilt the site, and apparently still have a lot of obsolete pages out there in Google.

Anyway, thank you for all of this, and I guess I’ll have to figure something out. Sorry you had to go through so much!!

Yes, thank you Scott!!

look at where the error traffic is coming from if you can in Google analytics it could be an old link you took down that is either still indexed by google or by another site, If you can figure out the page you can recreate a PHP page that doe nothing than redirect the client to another area on the site. other than the 404 page

OK - I will look at that and see if I can figure it out. Thank You!

Cynthia,

Yea, I’m just sorry I couldn’t find a way around it.

So here is what I decided to do for the Walk In Art Center site for now.

I just made a down & dirty page in the Cpanel 404 page builder. Maybe when I get time I’ll add some styling to make it more like the rest of the site.

I agree with @scottsteven you need to look and see where that traffic is coming from thats way, way to high of traffic for a 404 page to get. I would be tracking that down and putting in some 301 redirects or 410 intentionally removed. I’m guessing that Google isn’t gonna like that many 404’s

Wait… 80% of what? is it a large number?

Scott,

I looked at your 404 page, and I don’t think it’s that bad myself.

I couldn’t figure out in Analytics how to tell where the traffic is coming from. (What pages they’re looking for that no longer exist and instead getting the 404 page.)

Yes, I think the number is large. It shows over 3,000 for the 404.php page, and over 2,000 for the 404.html page which I don’t even have any more. They are currently the highest numbers for page views except for one other page.

Is there a way to tell if my 404 isn’t working correctly? To me it acts like it’s working. When I search my site on Google, and click on a listed page that no longer exists, the 404 page comes up. Also, if I go to my site, and add a bad URL, it also comes up. When I try that in that header check website thingee, it also say 404. I was just wondering if there is still a problem with it. Thanks!

Cynthia,
You can see it in safari developer tools , network tab for one.
Also, Watch the browser url when you go to a bad page. It should not change to your 404 page in the address bar, if it does then it is a redirect and not really returning a 404 for the bad page.
Watch my new one from the link above, in the address bar and in developer tools, then look at yours, you will see what I am talking about.

Which screen in analytics are you looking at, can you show a screen shot?

Also, maybe look in webmaster tools under the craw errors selection, that should reveal the actual bad pages, mine were showing as soft 404’s

1 Like

just a thought to cut to the chase on this I was thinking on my server I am going to change the Apache 404 page to a php script that will redirect them to the Home page, you might be able to do the same thing in htaccess but since I own my servers this will work well enough

That sounds like it may be good, but I don’t know how to do that. I will keep that in mind as something to try if I can’t get anything else working - thanks!

I don’t think a redirect will work, that’s basically what I was doing.
You need to return 404 from the bad page before it sends the error page to the browser. If you redirect it will return a page found (from the page you redirect to) instead.

You can tell if the url in the address bar changes from the bad page to your 404 page then it’s not correct.

Good luck :grinning:

Scott,

I couldn’t find a developer/network tab in Safari, but I’m not familiar with it as I don’t usually use it. I did try your 404 page though, and then mine, and I see what you’re talking about. I didn’t know it was a problem; at least visitors get a page with links to the site etc, but I guess it’s still not a good thing, probably with Google again too.

Mine showed a lot of soft 404s, and other stuff too that I’m sure is not good. I’ll try to put a shot of it here from Webmaster Tools. If this is a real problem, then I hate to, but I’m starting to think that I may have to do just a plain 404 from cPanel or whatever.