August 30, 2008
Last week, I wrote a post about the issues with the Soft 404 header status code in BANS sites and why Google hates a soft 404. After looking into it a bit further, I want to clarify that the method outlined in the previous post returns a 404 100% of the time when a page is not found. this is Good! The bad part however, is that when you type some gibberish into the address bar, it delivers a blank page!
Just to be clear
The trick we have to deal with is finding a way to deliver a more friendly 404 page to our visitors. With wordpress, using the method at the previous page works great on pages that truly, no longer exist. It brings you right to a custom page in wordpress, with links to other areas the user may be looking for.
At this point, I still don’t have an answer for the friendly page on the BANS only sites, or the pages with gibberish in the address bar. If anyone has experience with using custom 404’s in their hostgator panel, it may be helpful.
The goal of delivering an authentic page not found and 404 status code is however accomplished.
Mark
7 Responses to “Soft 404 in BANS Revisited”
Got something to say?
Posting tweet...
Interesting.
You would think something as simple as a custom 404 page for a stock BANS site would be easy, but it isn’t. I have tried to make custom in DW and upload - won’t work. I tried to use my host to make a custom 404 - nothing. The only way I can get this to 404 is with the standard method (ErrorDocument 404 /404).
Oh well, at least I now have 404’s.
Thanks Mark.
I have this answer from Hostgator, don’t know if it will help but hopefully it will
To create a custom 404 page that replaces our default 404 pages please follow the following directions:
If you just want a simple 404 page for all sites in the account. This method will work only if your domain name is propagated and you are using it to access the site, accessing via IP will not work:
1. Create a page called 404.shtml. You can write any text there you want or use HTML code or your favorite editing tool like Dreamweaver to design the 404 page.
2. Upload 404.shtml to the public_html directory of your site.
3. Now when you go to any of the domains including the primary domain of your site and go to a page that does not exist you will see your 404 message instead of ours.
If you want to use different 404 pages for different domains in the same account or want to be able to see your own 404’s when using the IP of the server use the following advanced instructions:
1. Design a custom page that you would like your viewers to see. Upload this page to your /public_html directory. You should call it something like “my404page.html”.
2. Edit the .htaccess file in /public_html to contain the following line, edit the line with the correct domain/path as needed:
ErrorDocument 404 http://somedomain.com/my404page.html
@ Steve -
Yup - its a pain!! BANS was coded to override any 404’s by delivering the main page nto the browser, regardless of the url that does not exist. Its a great way to make sure the visitor see’s something, but not good for search spiders.
@ Cherie -
Thank you for the detailed response to this!! I am going to try it out this morning on a site and see how it goes…
Mark
Has anyone tried using sonjay’s 404 code for fixing the soft 404s?
http://www.tropicalwebworks.com/images/misc/404code.txt
She refers to it as being a “pretty bad hack job” but if it works wouldn’t it be better than returning false 200s?
@ Sonia -
Yes, it is actually part of what is used on this same method.
Mark
Oops, I should have looked at your 404.txt and would have realized that. Haven’t tried this fix yet since it doesn’t completely work with the BANS only sites. Just happened to come across sonjay’s at the BANS forums and now see it is partly like yours.
Its actually Sonjays fix… I just made a few small changes to suit my own needs.
I have not done the redir on any BANS only sites…
Mark