![]() ![]() |
Technical Administrator![]() ![]() Group: Technical Administrators
Joined: 3-February 03
Posts: 3,926
From: Sydney Australia
|
Nov 9 2004, 12:04 AM |
|
|
For those that don't know, whenever your server cannot find a page that matches the URL, it will return a 404 error, which means, basically, can't find that, sorry. This situation is really common, not just for sites that change coding languages / redesign, but just for links from external sites and human error.
I am not sure where this topic belongs, but in may ways, it is a usability issue. If users can't find what they are lookign for, your site has a usability problem. so many times, I get to a site expecting to find an answer, only to find the page is dead. Straight for the back button, they lost me. Showing users a standard 404 page is just wasted traffic and, in many cases, traffic looking just for you. Why show them something useless? Thankfully, all major servers allow one to create a custom 404 error page. On Apache, it is relatively trivial, and this article is a great tutorial. So, what should a good 404 error page should do? IMHO, it should explain to the user what happenned, and provide them with multiple links to relevant sections of the site and perhaps a search box to loom for what they want. There is no doubt in my mind that the best custom 404 page is Apple's, http://www.apple.com/great-404-page. Ot has the explanation, QUOTE Looking for something at Apple.com?
The page you tried was not found. You may have used an outdated link or may have typed the address (URL) incorrectly. You might find what you’re looking for in one of these areas: followed by a series of links to the main "chucks" of the site. It even has a search box, should the links be inadequate. It really is a pity that so many sites just show the default 404 error message, e.g. http://www.arnotts.com.au/asdasd, http://www.three.com.au/asdasdasd. So, what can you do to improve your 404 page? Most I have seen can be improved, including the cre8 404 page, http://www.cre8asiteforums.com/asd, and it is a not a bad idea to look into it. |
||
| Offline | ![]() |
Star Member![]() ![]() Group: 1000 Post Club
Joined: 17-June 04
Posts: 1,760
From: Essex, UK
|
Nov 9 2004, 03:11 AM |
|
|
Had a custom 404 page online for ages. My host tells me what to call it (missing.html) and all I do is generaqte the page and ftp it to the site.
The only thing I discovered was you must use absolute links - If the page was missing then there is nothing to be relative to. Some hosts also provide .htaccess support (http://www.javascriptkit.com/howto/htaccess.shtml) which if they do is even better. Apache provides excellent .htaccess support (http://httpd.apache.org/docs/howto/htaccess.html. Bye for now |
||
| Offline | ![]() |
Moderator Alumni![]() ![]() Group: Hall Of Fame
Joined: 11-February 04
Posts: 5,892
From: Los Angeles, CA
|
Nov 9 2004, 11:04 AM |
|
|
Great topic. Pages get moved and deleted all the time. On my site, I have thousands of new pages, but conversely, also remove thousands of old pages (discontinued products) each quarter.
They're on your site anyway. Do everything you can to get that second click. Here's mine. http://www.respree.com/invalidurl |
||
| Offline | ![]() |
Moderator![]() ![]() Group: Moderators
Joined: 29-August 02
Posts: 5,751
From: Bristol, UK
|
Nov 9 2004, 12:48 PM |
|
|
Ian Lloyd wrote quite a good article on this for AListApart earlier this year.
The Perfect 404 gives some pointers in creating friendly 404's and some rudimentary distuinguishing between different 'types' of 404. One of those things I kept meaning to work on more and actually implement, but never got round to..... I think my own site's 404 is just some text saying sorry that page seems to have disapeared or something, with some links off to other things on the site. |
||
| Offline | ![]() |
Site Administrator![]() ![]() Group: Site Admin
Joined: 4-September 02
Posts: 6,887
From: Melbourne, Australia
|
Nov 9 2004, 03:52 PM |
|
|
Great topic php.
Custom 404 pages are vital to any website. It's amazing the number of people I've watched who've landed on a Page Not Found and thought they were the problem! A 404 is a simple way of telling your visitors that we've mucked up this page is no longe here but stick around anyway. Although my website is outdated :oops: I do have one: http://www.nitrogen.net.au/xdcd Here's another resource: 404 Resource Lab. |
||
| Offline | ![]() |
Lead Technical Administrator![]() Group: Admin - Top Level
Joined: 23-January 03
Posts: 1,995
From: Michigan USA
|
Nov 9 2004, 05:02 PM |
|
|
I don't quite have a phobia about broken links on my sites .. but it's close.
One of my oldest sites has grown a lot in six years, resulting in three fairly extensive reorganizations of the hard disk. For the longest time, I would always leave the old pages right where they had been, changing only the navigation so it pointed to the new structure. This insured someone coming to the site would *always* find a page, but it also insured no one, including the search engines, was ever motivated to update their links. In short, it didn't work too well. Back then, a 301 Redirect wasn't the cure-all Google has made it (actually, back then, Google wasn't even the major SE), and besides, some of my reorganizations would have confounded even mod_rewrite. So, after my last reorganization, I wrote what is essentially a database-driven custom 404 page. It know where things are, but remembers where things were, and tries to "guess" what the visitor really wanted. It also corrects some common typographical errors and, if the link is coming from a search engine, parses the query string and inserts their search phrases into my on-site search. For the most part, it seems to have helped a lot. Here's a few examples: Generic 404 Page has Moved No folders or extensions Coming from a search engine Note: I wouldn't post these if I thought there was ANY chance they'd be indexed! It's been long enough since my last reorganization that I get relatively few 404's -- and I'd like to keep it that way. |
||
| Online | ![]() |
Moderator Alumni![]() ![]() Group: Hall Of Fame
Joined: 9-January 04
Posts: 3,094
From: Canberra, Australia
|
Nov 9 2004, 05:14 PM |
|
|
Another 404 feature that can be helpful is automatically sending the details of the error to the webmaster. Don't worry about an e-mail link asking a user to do it - most won't bother - and they probably wouldn't even bother filling out a form either.
The details you could send are the page that was requested, the referring page (if any), the time and date of the error, and the IP address of the user. I've done that on my site, and I've found out that Google still indexes a page I used back in December last year, and people are finding it, and I've been notified of a few broken links on my site - since I knew where the user clicked, I was able to fix it. My 404 After reading this topic, I'm going to be doing some work on my 404 page, including trying to work out how to submit the form through PHP without having to have a hidden form on the page that submits with JavaScript (the 404 page has to be a shtml one). Thanks Michael! |
||
| Offline | ![]() |
MemberGroup: Members
Joined: 10-June 04
Posts: 35
From: Los Angeles
|
Nov 20 2004, 12:40 PM |
|
| Offline | ![]() |
Technical Administrator![]() ![]() Group: Technical Administrators
Joined: 3-February 03
Posts: 3,926
From: Sydney Australia
|
Nov 28 2004, 11:40 PM |
|
|
Hi m3p and welcome. That depends upon your server. On Apache (75% of most servers) it is really easy. http://httpd.apache.org/docs/custom-error.html has a pretty good explaination, and if you have CGI set up, you can run whatever you want at that point.
The email is a fantastic idea, although it may get very annoying if people link to dead stuff, or mispell something. IMHO, you would be better putting that stuff in a a DB and checking it, say weekly, or emailing a weekly report. I mean imagine, every misspelling, every bad link, all sending you an annoying email!!... it would drive you nuts!!! |
||
| Offline | ![]() |
UntestedGroup: Members
Joined: 13-July 04
Posts: 3
|
Nov 30 2004, 02:43 PM |
|
|
First off, thanks for all the great replies.
Now, for the gory details. When a "remote" url is used as the destination for a particular error, like the following: ErrorDocument 404 http://www.domain.com/cgi-bin/script.pl?er...=%{REQUEST_URI} the "%{REQUEST_URI}" doesn't get replaced with the real, bad, url. In addition, none of the other environment variables that usually contain the bad url get sent either. I'd like to use a remote url so that it can be pointed to by all of my sites, rather than have to incorporate the script into each site. Any thoughts? Thanks in advance. |
||
| Offline | ![]() |
|
|
2 Pages 1 2 >
|
|
| Lo-Fi Version | Time is now: 9th February 2010 - 10:40 AM |
| Meet our Moderators: | cre8pc : projectphp : sanity : Black Phoenix : bwelford : EGOL : Ruud : rustybrick : AbleReach : swainzy : joedolson: eKstreme: dazzlindonna : SEOigloo: iamlost : RisaBB |